9 #include <QScriptValue>
213 #define bpsMakeException(aMessage) BpsException(__FILE__, __LINE__, QString::fromLatin1(__FUNCTION__), aMessage, BpsException::Error)
222 #define bpsMakeExceptionWarning(aMessage) BpsException(__FILE__, __LINE__, QString::fromLatin1(__FUNCTION__), aMessage, BpsException::Warning)
231 #define bpsMakeExceptionInfo(aMessage) BpsException(__FILE__, __LINE__, QString::fromLatin1(__FUNCTION__), aMessage, BpsException::Info)
241 #define bpsMakeExceptionFatal(aMessage) BpsException(__FILE__, __LINE__, QString::fromLatin1(__FUNCTION__), aMessage, BpsException::Fatal)
250 #define bpsTraceException(aException) aException.addLocation(__FILE__, __LINE__, QString::fromLatin1(__FUNCTION__))
Public include file for BPS CORE library macros.
#define BPSCORE_EXPORT
Declare class to be an import from the shared library.
Definition: bpscore_global.h:22
#define BPS_PRIVATE(Class)
Declare pointer to private object in a public class.
Definition: bpsglobals.h:102
BPS error exception class.
Definition: bpsexception.h:31
QString message() const
Get the plain message, without location trace information.
BpsException & addLocation(const QString &aFilename, quint32 aLinenumber, const QString &aFunction)
Add another location to an existing exception.
BpsException & appendMessage(const QString &aText)
Append text to the error message of the exception.
BpsException(const QScriptValue &aException, const QString &aFilename=QString())
Constructor from QtScript exceptions.
BpsException & setSeverity(Severity aSeverity)
Set the error severity for the exception.
BpsException()
Default constructor for the BpsException objects.
BpsException & setMessage(const QString &aMessage)
Set the error message for the exception.
QScriptValue throwScriptError(QScriptContext *aContext) const
Throw a script error of the exception.
Severity severity() const
Get severity.
QString text(int aMaxLocs=1) const
Get the message, along with a log of the locations stack.
Severity
Severity of the exception.
Definition: bpsexception.h:38
@ Warning
Uncritical, retry later for example.
Definition: bpsexception.h:40
@ Error
Critical error.
Definition: bpsexception.h:41
@ Info
Information, debug stop for example.
Definition: bpsexception.h:39
BpsException(const BpsException &aException)
Copy constructor for the BpsException objects.
BpsException(const QString &aFilename, quint32 aLinenumber, const QString &aFunction, const QString &aMessage, Severity aSeverity)
Standard constructor for the BpsException objects.