Base class for most objects.
More...
#include <ErrorBase.h>
|
| ErrorBase (const ErrorBase &)=delete |
|
ErrorBase & | operator= (const ErrorBase &)=delete |
|
virtual Error & | GetError () |
| Retrieve the current error. More...
|
|
virtual const Error & | GetError () const |
|
virtual void | SetErrnoError (llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, int lineNumber) const |
| Set error information associated with a C library call that set an error to the "errno" global variable. More...
|
|
virtual void | SetImaqError (int success, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, int lineNumber) const |
| Set the current error information associated from the nivision Imaq API. More...
|
|
virtual void | SetError (Error::Code code, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, int lineNumber) const |
| Set the current error information associated with this sensor. More...
|
|
virtual void | SetErrorRange (Error::Code code, int32_t minRange, int32_t maxRange, int32_t requestedValue, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, int lineNumber) const |
| Set the current error information associated with this sensor. More...
|
|
virtual void | SetWPIError (llvm::StringRef errorMessage, Error::Code code, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, int lineNumber) const |
| Set the current error information associated with this sensor. More...
|
|
virtual void | CloneError (const 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. More...
|
|
|
static void | SetGlobalError (Error::Code code, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, int lineNumber) |
|
static void | SetGlobalWPIError (llvm::StringRef errorMessage, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, int lineNumber) |
|
static Error & | GetGlobalError () |
| Retrieve the current global error.
|
|
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::GetError |
( |
| ) |
|
|
virtual |
Retrieve the current error.
Get the current error information associated with this sensor.
void ErrorBase::SetErrnoError |
( |
llvm::StringRef |
contextMessage, |
|
|
llvm::StringRef |
filename, |
|
|
llvm::StringRef |
function, |
|
|
int |
lineNumber |
|
) |
| const |
|
virtual |
Set error information associated with a C library call that set an error to the "errno" global variable.
- Parameters
-
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, |
|
|
llvm::StringRef |
contextMessage, |
|
|
llvm::StringRef |
filename, |
|
|
llvm::StringRef |
function, |
|
|
int |
lineNumber |
|
) |
| const |
|
virtual |
Set the current error information associated with this sensor.
- Parameters
-
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::SetErrorRange |
( |
Error::Code |
code, |
|
|
int32_t |
minRange, |
|
|
int32_t |
maxRange, |
|
|
int32_t |
requestedValue, |
|
|
llvm::StringRef |
contextMessage, |
|
|
llvm::StringRef |
filename, |
|
|
llvm::StringRef |
function, |
|
|
int |
lineNumber |
|
) |
| const |
|
virtual |
Set the current error information associated with this sensor.
Range versions use for initialization code.
- Parameters
-
code | The error code |
minRange | The minimum allowed allocation range |
maxRange | The maximum allowed allocation range |
requestedValue | The requested value to allocate |
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, |
|
|
llvm::StringRef |
contextMessage, |
|
|
llvm::StringRef |
filename, |
|
|
llvm::StringRef |
function, |
|
|
int |
lineNumber |
|
) |
| const |
|
virtual |
Set the current error information associated from the nivision Imaq API.
- Parameters
-
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 |
( |
llvm::StringRef |
errorMessage, |
|
|
Error::Code |
code, |
|
|
llvm::StringRef |
contextMessage, |
|
|
llvm::StringRef |
filename, |
|
|
llvm::StringRef |
function, |
|
|
int |
lineNumber |
|
) |
| const |
|
virtual |
Set the current error information associated with this sensor.
- Parameters
-
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.
- Returns
- true if the current error is fatal.
The documentation for this class was generated from the following files: