|
rogue
|
Generic Rogue exception type. More...
#include <GeneralError.h>
Public Member Functions | |
| GeneralError (std::string src, std::string text) | |
| Constructs an error from source and message text. | |
| char const * | what () const throw () |
| Returns exception text for standard exception handling. | |
Static Public Member Functions | |
| static GeneralError | create (std::string src, const char *fmt,...) |
| Creates a formatted error instance. | |
| static void | setup_python () |
Registers Python exception translation for GeneralError. | |
| static void | translate (GeneralError const &e) |
Translates GeneralError into a Python exception. | |
Generic Rogue exception type.
Used for runtime errors that are not represented by a more specific exception class. Error messages are formatted as source: message and can be propagated to Python via setup_python() and translate().
Definition at line 45 of file GeneralError.h.
| rogue::GeneralError::GeneralError | ( | std::string | src, |
| std::string | text | ||
| ) |
Constructs an error from source and message text.
This constructor is a low-level C++ allocation path. Prefer create() when consistent factory semantics are desired.
| src | Source/function context string. |
| text | Error message body. |
Definition at line 34 of file GeneralError.cpp.
|
static |
Creates a formatted error instance.
This static factory provides a consistent construction path for this class.
| src | Source/function context string. |
| fmt | printf-style format string for the message body. |
GeneralError. Definition at line 38 of file GeneralError.cpp.
|
static |
Registers Python exception translation for GeneralError.
Definition at line 53 of file GeneralError.cpp.
|
static |
Translates GeneralError into a Python exception.
| e | Caught exception instance. |
Definition at line 68 of file GeneralError.cpp.
| char const * rogue::GeneralError::what | ( | ) | const | |
| throw | ( | |||
| ) | ||||
Returns exception text for standard exception handling.
Definition at line 49 of file GeneralError.cpp.