Reference documentation for deal.II version 8.1.0
Enumerations | Functions
deal_II_exceptions::internals Namespace Reference

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)
 

Detailed Description

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.

Enumeration Type Documentation

An enum describing how to treat an exception in issue_error

Definition at line 244 of file exceptions.h.

Function Documentation

void deal_II_exceptions::internals::abort ( const ExceptionBase exc,
bool  nothrow = false 
)

Conditionally abort the program.

Depending on whether 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 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()).

template<class exc >
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.

ExceptionBase

Definition at line 258 of file exceptions.h.