libcosmos
Linux C++ System Programming Library
|
Exception type for logical usage errors within the application. More...
#include <UsageError.hxx>
Public Member Functions | |
UsageError (const std::string_view msg) | |
![]() | |
CosmosError (const std::string_view error_class, const std::string_view fixed_text={}) | |
CosmosError & | setInfo (const char *file, const size_t line, const char *func) |
Set exception context information. | |
const char * | what () const override throw () |
Implementation of the std::exception interface. | |
std::string | shortWhat () const |
Returns a shorter description of the error without verbose context. | |
virtual void | raise ()=0 |
Throw the most specialized type of this object in the inheritance hierarchy. | |
Public Attributes | |
COSMOS_ERROR_IMPL | |
Additional Inherited Members | |
![]() | |
virtual void | generateMsg () const |
Append type specific error information to m_msg. | |
void | setErrorClass (const std::string_view error_class) |
Allows to override error class to allow simpler implementation of derived types. | |
![]() | |
std::string_view | m_error_class |
Descriptive, unique error class label. | |
std::string | m_msg |
Runtime generated error message. | |
bool | m_msg_generated = false |
Whether m_msg has been assembled yet. | |
const char * | m_file = nullptr |
const char * | m_func = nullptr |
size_t | m_line = 0 |
Exception type for logical usage errors within the application.
This error should be used when the caller of a function has violated logical preconditions and continuing is impossible.
Definition at line 13 of file UsageError.hxx.
|
inlineexplicit |
Definition at line 17 of file UsageError.hxx.
cosmos::UsageError::COSMOS_ERROR_IMPL |
Definition at line 22 of file UsageError.hxx.