Reference documentation for deal.II version 8.5.1
|
Enumerations | |
enum | ExceptionHandling { abort_on_exception, throw_on_exception, abort_nothrow_on_exception } |
Functions | |
void | abort (const ExceptionBase &exc, bool nothrow=false) |
template<class exc > | |
void | issue_error (ExceptionHandling handling, const char *file, int line, const char *function, const char *cond, const char *exc_name, exc e) |
The functions in this namespace are in connection with the Assert and AssertThrow mechanism but are solely for internal purposes and are not for use outside the exception handling and throwing mechanism.
An enum describing how to treat an exception in issue_error.
Enumerator | |
---|---|
abort_on_exception | Abort the program by calling |
throw_on_exception | Throw the exception normally. |
abort_nothrow_on_exception | Call |
Definition at line 244 of file exceptions.h.
void deal_II_exceptions::internals::abort | ( | const ExceptionBase & | exc, |
bool | nothrow = false |
||
) |
Conditionally abort the program.
Depending on whether deal_II_exceptions::disable_abort_on_exception was called, this function either aborts the program flow by printing the error message provided by exc
and calling std::abort()
, or throws exc
instead (if nothrow
is set to false
).
If the boolean nothrow
is set to true and deal_II_exceptions::disable_abort_on_exception was called, the exception type is just printed to deallog and program flow continues. This is useful if throwing an exception is prohibited (e.g. in a destructor with noexcept(true)
or throw()
).
Definition at line 409 of file exceptions.cc.
void deal_II_exceptions::internals::issue_error | ( | ExceptionHandling | handling, |
const char * | file, | ||
int | line, | ||
const char * | function, | ||
const char * | cond, | ||
const char * | exc_name, | ||
exc | e | ||
) |
This routine does the main work for the exception generation mechanism used in the Assert
macro.
Definition at line 271 of file exceptions.h.