18 #include "internal/berryIRuntimeConstants.h" 19 #include "internal/berryCTKPluginActivator.h" 33 catch (
const ctkException& e)
35 HandleException(code, e);
37 catch (
const std::exception& e)
39 HandleException(code, e);
43 HandleException(code);
49 HandleException(code, ctkException(
"Unknown exception thrown"));
53 const std::exception& e)
55 HandleException(code, ctkException(e.what()));
59 const ctkException& e)
62 Q_UNUSED(dynamic_cast<const OperationCanceledException&>(e))
64 catch (
const std::bad_cast& )
67 QString pluginId = CTKPluginActivator::getPluginId(static_cast<void*>(code.
GetPointer()));
68 if (pluginId.isEmpty())
69 pluginId = IRuntimeConstants::PI_RUNTIME();
70 QString message = QString(
"Problems occurred when invoking code from plug-in: \"%1\".").arg(pluginId);
79 catch (
const std::bad_cast&)
89 qWarning() << e.printStackTrace();
91 code->HandleException(e);
static void Run(ISafeRunnable::Pointer code)
SmartPointer< IStatus > GetStatus() const
ObjectType * GetPointer() const