exceptions.hh File Reference

#include <exception>
#include <iostream>
#include <string>
#include <cstdlib>
#include <sstream>
#include <new>
#include "outputOperator.hh"

Go to the source code of this file.

Classes

class  concepts::Assertion
 Exception class for assertions. More...
 
class  concepts::DimensionMismatch
 Exception class to express dimensions not matching. More...
 
class  concepts::ExceptionBase
 Base class for exceptions. More...
 
class  concepts::IndexNotExisting
 Exception class to express that an index in a dynamic array does not exist. More...
 
class  concepts::MissingFeature
 Exception class to express a missing feature. More...
 
class  concepts::Stacktrace
 Dumps a stack trace using gdb. More...
 
class  concepts::WrongInputException
 Exception class to express an input criteria was not met. More...
 

Namespaces

 concepts
 Basic namespace for Concepts-2.
 

Macros

#define __PRETTY_FUNCTION__   "(unknown)"
 
#define CONCEPTS_SIMPLE_EXC(msg)
 
#define conceptsAssert(cond, exc)   { }
 Assert that a certain condition is fulfilled. More...
 
#define conceptsAssert3(cond, exc, msg)   { }
 Assert that a certain condition is fulfilled. More...
 
#define conceptsException(exc)
 Prepares an exception for throwing. More...
 
#define conceptsThrowSimpleE(msg)
 Throws a equivalent to conceptsAssert(false, exc) More...
 

Functions

template<class exc >
exc concepts::exception_set_fields (exc e, const std::string &file, const unsigned int line, const std::string &function, const std::string &excName)
 Sets fields on exception and throws it. More...
 
template<class exc >
void concepts::exception_throw_assert (const std::string &file, int line, const std::string &function, const std::string &exc_name, const std::string &cond, exc e)
 Sets the fields of an assertion and throws it. More...
 

Detailed Description

Exception classes file

Assert: an exeption should be thrown with information about: file, line, function, violated condition, exception name. This exception can be handled in the main program.

Definition in file exceptions.hh.

Macro Definition Documentation

◆ __PRETTY_FUNCTION__

#define __PRETTY_FUNCTION__   "(unknown)"

Definition at line 297 of file exceptions.hh.

◆ CONCEPTS_SIMPLE_EXC

#define CONCEPTS_SIMPLE_EXC (   msg)
Value:
exception_set_fields(ExceptionBase(), std::string(__FILE__), __LINE__, \
std::string(__PRETTY_FUNCTION__), std::string(msg))

Definition at line 349 of file exceptions.hh.

◆ conceptsException

#define conceptsException (   exc)
Value:
exception_set_fields(exc, std::string(__FILE__), __LINE__, \
std::string(__PRETTY_FUNCTION__), std::string(#exc))

Prepares an exception for throwing.

This is the main routine in the exception mechanism for production mode error checking. See the ExceptionBase class for more information.

Parameters
excException to be thrown
See also
ExceptionBase
Test:
test::ExceptionTest
Author
Philipp Frauenfelder, 2000
Examples
hpFEM2d.cc, and hpFEM3d-EV.cc.

Definition at line 345 of file exceptions.hh.

#define __PRETTY_FUNCTION__
Definition: exceptions.hh:296
exc exception_set_fields(exc e, const std::string &file, const unsigned int line, const std::string &function, const std::string &excName)
Sets fields on exception and throws it.
Definition: exceptions.hh:316
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich