#include <Exception.h>
Inherited by RulbusAddressError, RulbusCloseError, RulbusConfigError, RulbusContextError, RulbusDataError, RulbusHandleError, RulbusInterfaceError, RulbusOpenError, RulbusParseError, RulbusRangeError, RulbusScanError, and RulbusTimeoutError.
RulbusError acts for the whole library, but can only remember a single error for all threads. If the message was recorded by a another thread than the one that retrieves the message, the message returned says so. See getLastError().
Accessors | |
virtual CharCptr | what () const |
return message. | |
virtual unsigned long | lasttid () const |
return thread id for current message | |
bool | getLastError (char *msg, int maxlen) |
format last error into message buffer. | |
Public Member Functions | |
Construction | |
RulbusError () | |
default constructor. | |
RulbusError (CharCptr fmt...) | |
format a Rulbus error. | |
RulbusError (StringCref string) | |
set a Rulbus error. | |
RulbusError (StdExceptionCref e) | |
constructor taking exception& . | |
RulbusError (RulbusErrorCref e) | |
constructor taking RulbusError& . | |
virtual | ~RulbusError () |
destructor. | |
Private Attributes | |
String | msg |
error message | |
unsigned long | tid |
thread id for this error | |
Static Private Attributes | |
RulbusError | theError |
save the last Rulbus error. |
|
getLastError() formats the last error into message buffer.
It copies at most Only one message is retained for all threads using the Rulbus Device Class Library. If the error message for the thread calling getLastError() is not available (anymore), the following message is returned:
|