|
WPILibC++
2020.3.2
|
Base class for most objects. More...
#include <ErrorBase.h>
Public Member Functions | |
| ErrorBase (const ErrorBase &)=default | |
| ErrorBase & | operator= (const ErrorBase &)=default |
| ErrorBase (ErrorBase &&)=default | |
| ErrorBase & | operator= (ErrorBase &&)=default |
| virtual Error & | GetError () |
| Retrieve the current error. More... | |
| virtual const Error & | GetError () const |
| Retrieve the current error. More... | |
| virtual void | ClearError () const |
| Clear the current error information associated with this sensor. | |
| virtual void | SetErrnoError (const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::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, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) const |
| Set the current error information associated from the nivision Imaq API. More... | |
| virtual void | SetError (Error::Code code, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::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, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) const |
| Set the current error information associated with this sensor. More... | |
| virtual void | SetWPIError (const wpi::Twine &errorMessage, Error::Code code, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) const |
| Set the current error information associated with this sensor. More... | |
| virtual void | CloneError (const ErrorBase &rhs) const |
| virtual bool | StatusIsFatal () const |
| Check if the current error code represents a fatal error. More... | |
| void | ClearGlobalErrors () |
| Clear global errors. | |
Static Public Member Functions | |
| static void | SetGlobalError (Error::Code code, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) |
| static void | SetGlobalWPIError (const wpi::Twine &errorMessage, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) |
| static Error | GetGlobalError () |
| Retrieve the last global error. | |
| static std::vector< Error > | GetGlobalErrors () |
| Retrieve all global errors. | |
Protected Attributes | |
| Error | m_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.
|
virtual |
Retrieve the current error.
Get the current error information associated with this sensor.
|
virtual |
Retrieve the current error.
Get the current error information associated with this sensor.
|
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 |
|
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 |
|
virtual |
Set the current error information associated with this sensor.
Range versions use for initialization code.
| 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 |
|
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 |
|
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 |
|
virtual |
Check if the current error code represents a fatal error.