26 #ifndef ZBLTHREADERR_H 27 #define ZBLTHREADERR_H 30 #include <QThreadStorage> 39 #define zThreadErr (ZblThreadErr::zInstance()) 119 const QString& facility,
121 const QString& message
131 const char* facility,
243 #endif // ZBLTHREADERR_H const ZblError & error() const
Returns a reference to the ZblError instance for the current thread.
void notifyError(const ZblError &error)
Sent when an error condition has been set.
void abort()
Sets the current thread's error status to abort and issues the notifyAbort signal.
A class to manage Zuble's thread-specific state. This includes error propagation and thread abort han...
void notifyClearError()
Sent when an error condition has been cleared.
void notifyAbort()
Sent when an abort is requested.
bool m_aborting
Aborting flag fo this thread.
ZblThreadErr(QObject *parent=0)
Don't construct this. Call static zInstance() method or use the zThreadErr macro definition instead...
static void zInit()
This method must be called once at the start of each thread that throws or catches ZblException objec...
Data object for thread local error status information.
QString getErrorMessage()
Obtain a formatted error message.
static QThreadStorage< ZblThreadErr * > m_zThreads
A set of ZblThreadErr object pointers in thread local storage.
ZblError m_error
The error object for this thread.
bool isError()
Test if an error condition exists.
bool isAborting()
Test if an abort condition exists.
static ZblThreadErr & zInstance()
Returns a reference to the ZblThreadErr instance for the current thread.
void clearError()
Sets the current thread's error status to normal and issues the notifyClearError signal.
Zuble objects embed this class to save local logging state.
static ZblLogCategory m_log
void raiseError(const QString &facility, const QString &code, const QString &message)
Sets the current thread's error information and issues the notifyError signal.