#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... | |
Namespaces | |
| namespace | concepts |
Geometries and material constants for eddy current problems. | |
Defines | |
| #define | __PRETTY_FUNCTION__ "(unknown)" |
| #define | CONCEPTS_SIMPLE_EXC(msg) |
| #define | conceptsAssert(cond, exc) |
| #define | conceptsAssert3(cond, exc, msg) |
| #define | conceptsException(exc) |
| Prepares an exception for throwing. | |
| #define | conceptsThrowSimpleE(msg) |
| Throws a equivalent to conceptsAssert(false, exc) | |
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. | |
| 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. | |
| #define __PRETTY_FUNCTION__ "(unknown)" |
Definition at line 251 of file exceptions.hh.
| #define CONCEPTS_SIMPLE_EXC | ( | msg | ) |
exception_set_fields(ExceptionBase(), std::string(__FILE__), __LINE__, \ std::string(__PRETTY_FUNCTION__), std::string(msg))
Definition at line 303 of file exceptions.hh.
| #define conceptsAssert | ( | cond, | |
| exc | |||
| ) |
{ \
if (!(cond)) { \
std::stringstream errorMsg; \
errorMsg << "by violating condition <" << #cond << ">"; \
exception_throw_assert(std::string(__FILE__), __LINE__, \
std::string(__PRETTY_FUNCTION__), \
std::string(#exc), errorMsg.str(), exc); \
} \
}
Definition at line 351 of file exceptions.hh.
| #define conceptsAssert3 | ( | cond, | |
| exc, | |||
| msg | |||
| ) |
{ \
if (!(cond)) { \
std::stringstream errorMsg; \
errorMsg << "by violating condition <" << #cond << ">, " << msg; \
exception_throw_assert(std::string(__FILE__), __LINE__, \
std::string(__PRETTY_FUNCTION__), \
std::string(#exc), errorMsg.str(), exc); \
} \
}
Definition at line 399 of file exceptions.hh.
| #define conceptsException | ( | exc | ) |
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.
| exc | Exception to be thrown |
Definition at line 299 of file exceptions.hh.