Lumiera
0.pre.03
»edit your freedom«
|
Some aspects of C++ exception handling.
Not to be confused with the basic C-style error value mechanism used by the low-level parts of the vault. Both approaches are largely orthogonal, but the C++ exception handling uses the C-style error constants.
Definition at line 67 of file exception-error-test.cpp.
Classes | |
class | SpecificError |
a very specific Exception class local to this scope and with additional behaviour. More... | |
Private Types | |
typedef ExceptionError_test | test |
Private Member Functions | |
void | catcher (void(ExceptionError_test::*funky)(string), string context="") |
helper: provides a bunch of catch-clauses and runs the given member functions within | |
void | checkErrorFlagPropagation () |
void | checkRootCauseChaining () |
void | detectErrorflag (string) |
void | doubleNestedTh (string msg) |
void | nestedThrower (string msg) |
virtual void | run (Arg) |
void | throwDerived (string) |
void | throwExceptn (string) |
void | throwExternal (string _) |
void | throwFatal (string _) |
void | throwInvalid (string _) |
void | throwRuntime (string _) |
void | throwSpecial (string) |
|
inlineprivate |
Definition at line 92 of file exception-error-test.cpp.
|
inlineprivate |
This feature is important for passing exceptions transparently over several layers. The nested operation will throw an error::External, which we are able to catch because it is derived from std::exception. We don't need to know the exact type, but we can classify the error situation as a "state error" and throw an error::State, passing on the root cause. Some levels up, this error get caught and the root cause can be extracted successfully.
Definition at line 110 of file exception-error-test.cpp.
Referenced by ExceptionError_test::doubleNestedTh().
|
inlineprivate |
Definition at line 122 of file exception-error-test.cpp.
References ExceptionError_test::nestedThrower(), and Error::what().
|
inlineprivate |
Definition at line 140 of file exception-error-test.cpp.
References ExceptionError_test::catcher(), lumiera_error_peek(), and lumiera_error_set().
|
inlineprivate |
Definition at line 153 of file exception-error-test.cpp.
References Error::rootCause().