15 #include "internal/berryIRuntimeConstants.h" 17 #include <QTextStream> 22 const QList<IStatus::Pointer> Status::theEmptyStatusArray = QList<IStatus::Pointer>();
27 IRuntimeConstants::PI_RUNTIME(), 0,
"OK", sl));
34 IRuntimeConstants::PI_RUNTIME(), 1,
"", sl));
40 : exception(nullptr), sourceLocation(sl)
49 const QString& message,
const ctkException& exception,
51 : exception(nullptr), sourceLocation(sl)
62 : exception(nullptr), sourceLocation(sl)
71 const QString& message,
const ctkException& exception,
73 : exception(nullptr), sourceLocation(sl)
84 return theEmptyStatusArray;
127 return (severity & severityMask) != 0;
152 delete this->exception;
153 this->exception = exception.clone();
158 this->message = message;
163 Q_ASSERT(!pluginId.isEmpty());
164 this->pluginId = pluginId;
169 this->severity = severity;
175 QTextStream ss(&str);
195 ss <<
"severity=" << severity;
198 ss <<
": " << pluginId <<
" code=" << code <<
" " << message;
201 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)
Implements transparent reference counting.
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)