Beispiel #1
0
void WorkbenchPlugin::Log(const QString& clazz,
                          const QString& methodName, const ctkException &t)
{
  QString msg = QString("Exception in ") + clazz + "." + methodName + ": "
      + t.what();

  WorkbenchPlugin::Log(msg, t);
}
Beispiel #2
0
IStatus::Pointer StatusUtil::NewStatus(IStatus::Severity severity, const QString& message,
                                  const ctkException& exc, const Status::SourceLocation& sl)
{
  QString statusMessage = message;
  if (message.isNull() || message.trimmed().isEmpty())
  {
    if (exc.message().isEmpty())
    {
      statusMessage = exc.what();
    }
    else
    {
      statusMessage = exc.message();
    }
  }

  IStatus::Pointer status(new Status(severity, PlatformUI::PLUGIN_ID(), severity,
                                     statusMessage, GetCause(exc), sl));
  return status;
}