ChimeraTK-DeviceAccess
03.18.00
|
Exception thrown when a logic error has occured. More...
#include <Exception.h>
Public Member Functions | |
logic_error (std::string message) noexcept | |
Constructor. More... | |
const char * | what () const noexcept override |
Return the message describing what exactly went wrong. More... | |
Exception thrown when a logic error has occured.
This usually means that the program logic is flawed, which points to a programming or configuration error. The exception is also thrown if a feature is used which is not implemented (e.g. an unsupported AccessModeFlag has been specified). After the exception, the system might be in an unspecified condition which might require shutting down the application.
Note, that it should be generally possible to avoid thrown logic_error exceptions in the first place by checking the system status and only perfoming only allowed operations. Therefore it is good practice to not catch this type of exceptions in applications, or to catch the error only for proper dispaly in a GUI and then terminate.
Definition at line 51 of file Exception.h.
|
explicitnoexcept |
Constructor.
The passed message is returned by a call to what() and should describe what exactly went wront.
Definition at line 18 of file Exception.cpp.
|
overridenoexcept |
Return the message describing what exactly went wrong.
The returned message is only descriptive and only meant for display. Program logic must never be based on the content of this string.
Definition at line 20 of file Exception.cpp.