APIs, concepts, guides, and more
|
Represents the error details thrown as an exception by all RapidCode classes. This class contains an error number/type, RSIErrorMessage, and a text message which describes the error. Throwing exceptions can be disabled on all RSI classes. If throwing exceptions is disabled, a log of RsiErrors can be accessed. Inherits from std::exception in C++ and System.Exception in C#. More...
Functions | |
RsiError (const RsiError ©From) | |
Copy constructor for RsiError. | |
const char * | what () const noexcept |
Returns a null terminated character sequence that may be used to identify the exception. | |
Attributes | |
char | fileName [RSI_ERROR_TEXT_SIZE] |
source file name | |
char | functionName [RSI_ERROR_TEXT_SIZE] |
Function name of the raised the error. | |
bool | isWarning |
Whether the error is or is not a warning. | |
int32_t | lineNumber |
Source code line number. | |
RSIErrorMessage | number |
Error number. | |
int32_t | objectIndex |
Object index (0-based index of the object that has the error). | |
char | shortText [RSI_ERROR_TEXT_SIZE] |
Error short text. | |
Static Attributes | |
static constexpr uint32_t | RSI_ERROR_TEXT_SIZE = 512U |
Error message text. | |
RSIErrors are thrown from RapidCode API calls and provide useful information for diagnostics and debugging. Objects and all data members are created on the stack and the RsiError object itself is thrown. The preferred catch is by const reference, but by value will work, too. It is safe to assume that every RapidCode API call can throw an RsiError.
Exception throwing can be disabled for an object instance using RapidCodeObject::ThrowExceptions(false) and enabled using RapidCodeObject::ThrowExceptions(true). It can be disabled across then entire API by calling this function on the MotionController instance if set to false, a log of RsiErrors can be accessed using RapidCodeObject::ErrorLogGet()