|
WPILib 2012
WPILibRoboticsLibraryforFRC
|
#include <ErrorBase.h>
Public Member Functions | |
| virtual Error & | GetError () |
| Retrieve the current error. Get the current error information associated with this sensor. | |
| virtual const Error & | GetError () const |
| virtual void | SetErrnoError (const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const |
| Set error information associated with a C library call that set an error to the "errno" global variable. | |
| virtual void | SetImaqError (int success, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const |
| Set the current error information associated from the nivision Imaq API. | |
| virtual void | SetError (Error::Code code, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const |
| Set the current error information associated with this sensor. | |
| virtual void | SetWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const |
| Set the current error information associated with this sensor. | |
| virtual void | CloneError (ErrorBase *rhs) const |
| virtual void | ClearError () const |
| Clear the current error information associated with this sensor. | |
| virtual bool | StatusIsFatal () const |
| Check if the current error code represents a fatal error. | |
Static Public Member Functions | |
| static void | SetGlobalError (Error::Code code, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) |
| static void | SetGlobalWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) |
| static Error & | GetGlobalError () |
Protected Member Functions | |
| ErrorBase () | |
| Initialize the instance status to 0 for now. | |
Protected Attributes | |
| Error | m_error |
Static Protected Attributes | |
| static SEM_ID | _globalErrorMutex = semMCreate(SEM_Q_PRIORITY | SEM_DELETE_SAFE | SEM_INVERSION_SAFE) |
| static Error | _globalError |
Base class for most objects. ErrorBase is the base class for most objects since it holds the generated error for that object. In addition, there is a single instance of a global error object
| Error & ErrorBase::GetGlobalError | ( | ) | [static] |
Retrieve the current global error.
| void ErrorBase::SetErrnoError | ( | const char * | contextMessage, |
| const char * | filename, | ||
| const char * | function, | ||
| UINT32 | lineNumber | ||
| ) | const [virtual] |
Set error information associated with a C library call that set an error to the "errno" global variable.
| contextMessage | A custom message from the code that set the error. |
| filename | Filename of the error source |
| function | Function of the error source |
| lineNumber | Line number of the error source |
| void ErrorBase::SetError | ( | Error::Code | code, |
| const char * | contextMessage, | ||
| const char * | filename, | ||
| const char * | function, | ||
| UINT32 | lineNumber | ||
| ) | const [virtual] |
Set the current error information associated with this sensor.
| code | The error code |
| contextMessage | A custom message from the code that set the error. |
| filename | Filename of the error source |
| function | Function of the error source |
| lineNumber | Line number of the error source |
| void ErrorBase::SetImaqError | ( | int | success, |
| const char * | contextMessage, | ||
| const char * | filename, | ||
| const char * | function, | ||
| UINT32 | lineNumber | ||
| ) | const [virtual] |
Set the current error information associated from the nivision Imaq API.
| success | The return from the function |
| contextMessage | A custom message from the code that set the error. |
| filename | Filename of the error source |
| function | Function of the error source |
| lineNumber | Line number of the error source |
| void ErrorBase::SetWPIError | ( | const char * | errorMessage, |
| const char * | contextMessage, | ||
| const char * | filename, | ||
| const char * | function, | ||
| UINT32 | lineNumber | ||
| ) | const [virtual] |
Set the current error information associated with this sensor.
| errorMessage | The error message from WPIErrors.h |
| contextMessage | A custom message from the code that set the error. |
| filename | Filename of the error source |
| function | Function of the error source |
| lineNumber | Line number of the error source |
| bool ErrorBase::StatusIsFatal | ( | ) | const [virtual] |
Check if the current error code represents a fatal error.
1.7.4