Reference documentation for deal.II version Git 4a2ac69 2017-09-19 13:41:17 -0400
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)
 
template<class ExceptionType >
void issue_error (ExceptionHandling handling, const char *file, int line, const char *function, const char *cond, const char *exc_name, ExceptionType e)
 
void issue_error_nothrow (ExceptionHandling, const char *file, int line, const char *function, const char *cond, const char *exc_name, ExceptionBase e) noexcept
 

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.

Function Documentation

void deal_II_exceptions::internals::abort ( const ExceptionBase exc)

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.

Definition at line 476 of file exceptions.cc.

template<class ExceptionType >
void deal_II_exceptions::internals::issue_error ( ExceptionHandling  handling,
const char *  file,
int  line,
const char *  function,
const char *  cond,
const char *  exc_name,
ExceptionType  e 
)

This routine does the main work for the exception generation mechanism used in the Assert macro.

The actual exception object (the last argument) is typically an unnamed object created in place; because we modify it, we can't take it by const reference, and temporaries don't bind to non-const references. So take it by value (=copy it) – the performance implications are pretty minimal anyway.

ExceptionBase

Definition at line 277 of file exceptions.h.

void deal_II_exceptions::internals::issue_error_nothrow ( ExceptionHandling  ,
const char *  file,
int  line,
const char *  function,
const char *  cond,
const char *  exc_name,
ExceptionBase  e 
)
noexcept

Exception generation mechanism in case we must not throw.

ExceptionBase

Definition at line 453 of file exceptions.cc.