22 #include "internal/berryIRuntimeConstants.h"
23 #include "internal/berryCTKPluginActivator.h"
37 catch (
const ctkException& e)
39 HandleException(code, e);
41 catch (
const std::exception& e)
43 HandleException(code, e);
47 HandleException(code);
53 HandleException(code, ctkException(
"Unknown exception thrown"));
57 const std::exception& e)
59 HandleException(code, ctkException(e.what()));
63 const ctkException& e)
66 dynamic_cast<const OperationCanceledException&
>(e);
68 catch (
const std::bad_cast& )
71 QString pluginId = CTKPluginActivator::getPluginId(static_cast<void*>(code.GetPointer()));
72 if (pluginId.isEmpty())
73 pluginId = IRuntimeConstants::PI_RUNTIME();
74 QString message = QString(
"Problems occurred when invoking code from plug-in: \"%1\".").arg(pluginId);
77 const CoreException& coreExc =
dynamic_cast<const CoreException&
>(e);
80 multiStatus->Merge(coreExc.GetStatus());
83 catch (
const std::bad_cast&)
93 qWarning() << e.printStackTrace();
95 code->HandleException(e);
berry::SmartPointer< Self > Pointer
static void Run(ISafeRunnable::Pointer code)
berry::SmartPointer< Self > Pointer
berry::SmartPointer< Self > Pointer