19 #include "internal/berryIRuntimeConstants.h"
21 #include <QTextStream>
26 const QList<IStatus::Pointer> Status::theEmptyStatusArray = QList<IStatus::Pointer>();
31 IRuntimeConstants::PI_RUNTIME(), 0,
"OK", sl));
38 IRuntimeConstants::PI_RUNTIME(), 1,
"", sl));
44 : exception(nullptr), sourceLocation(sl)
53 const QString& message,
const ctkException& exception,
55 : exception(nullptr), sourceLocation(sl)
66 : exception(nullptr), sourceLocation(sl)
75 const QString& message,
const ctkException& exception,
77 : exception(nullptr), sourceLocation(sl)
88 return theEmptyStatusArray;
131 return (severity & severityMask) != 0;
156 delete this->exception;
157 this->exception = exception.clone();
162 this->message = message;
167 Q_ASSERT(!pluginId.isEmpty());
168 this->pluginId = pluginId;
173 this->severity = severity;
179 QTextStream ss(&str);
199 ss <<
"severity=" << severity;
202 ss <<
": " << pluginId <<
" code=" << code <<
" " << message;
205 ss <<
" " << exception->what();
bool IsMultiStatus() const override
QString GetMessage() const override
virtual void SetPlugin(const QString &pluginId)
int GetCode() const override
QString GetPlugin() const override
static const IStatus::Pointer CANCEL_STATUS(const SourceLocation &sl)
QString GetMethodName() const override
QString ToString() const override
bool Matches(const Severities &severityMask) const override
bool IsOK() const override
virtual void SetSeverity(const Severity &severity)
QString GetFileName() const override
const ctkException * GetException() const override
virtual void SetMessage(const QString &message)
Severity GetSeverity() const override
static const IStatus::Pointer OK_STATUS(const SourceLocation &sl)
virtual void SetCode(int code)
QList< IStatus::Pointer > GetChildren() const override
int GetLineNumber() const override
Status(const Severity &severity, const QString &pluginId, int code, const QString &message, const SourceLocation &sl)
virtual void SetException(const ctkException &exception)