![]() |
Imaging Control 4 C++ Library 1.4.0
|
This class to capture error information from library function calls. More...
Public Member Functions | |
| operator bool () const noexcept | |
| Checks whether this object is in an error state. | |
| bool | isError () const noexcept |
| Checks whether this object is in an error state. | |
| bool | isSuccess () const noexcept |
| Checks whether this object is in a success state. | |
| ErrorCode | code () const noexcept |
| Returns the error code. | |
| std::string | message () const |
| Returns the error message. | |
| void | throwAsIC4Exception () const |
| Throws this Error as an IC4Exception. | |
Static Public Member Functions | |
| static Error & | Ignore () |
| An error handler that ignores all errors. | |
| static Error & | Throw () |
| An error handler that throws all errors. | |
| static Error & | Default () |
| The default error handler. | |
This class to capture error information from library function calls.
See Error Handling for a general overview of how error handling works in this library.
|
inlinenoexcept |
Returns the error code.
|
inlinestatic |
The default error handler.
The err parameter of all library functions is set to Default() by default.
If a function that got Default() passed as its err parameter, the behavior is as follows:
|
inlinestatic |
An error handler that ignores all errors.
If an error occurs during a function call its argument set to Ignore(), errors are ignored.
The return value of the function can still signal a possible error condition.
|
inlinenoexcept |
Checks whether this object is in an error state.
true, if this error's code is not equal to ErrorCode::NoError, otherwise false.
|
inlinenoexcept |
Checks whether this object is in a success state.
true, if this error's code is equal to ErrorCode::NoError, otherwise false.
|
inline |
Returns the error message.
|
inlineexplicitnoexcept |
Checks whether this object is in an error state.
true, if this error's code is not equal to ErrorCode::NoError, otherwise false.
|
inlinestatic |
An error handler that throws all errors.
If an error occurs during a function call with its err argument set to Throw(), IC4Exception is thrown.
|
inline |
Throws this Error as an IC4Exception.
| IC4Exception |