exceptions.hh File Reference
Detailed Description
A few common exception classes.This file defines a common framework for generating exception subclasses and to throw them in a simple manner
#include <string>
#include <sstream>
Go to the source code of this file.
Namespaces | |
namespace | Dune |
Classes | |
class | Dune::Exception |
Base class for Dune-Exceptions. More... | |
class | Dune::IOError |
Default exception class for I/O errors. More... | |
class | Dune::MathError |
Default exception class for mathematical errors. More... | |
class | Dune::RangeError |
Default exception class for range errors. More... | |
class | Dune::NotImplemented |
Default exception for dummy implementations. More... | |
class | Dune::SystemError |
Default exception class for OS errors. More... | |
class | Dune::OutOfMemoryError |
Default exception if memory allocation fails. More... | |
class | Dune::InvalidStateException |
Default exception if a function was called while the object is not in a valid state for that function. More... | |
Defines | |
#define | DUNE_THROW(E, m) |
Define Documentation
#define DUNE_THROW | ( | E, | |||
m | ) |
Value:
do { E th__ex; std::ostringstream th__out; \ th__out << THROWSPEC(E) << m; th__ex.message(th__out.str()); throw th__ex; \ } while (0)
- Parameters:
-
E exception class derived from Dune::Exception m reason for this exception in ostream-notation
if (filehandle == 0) DUNE_THROW(FileError, "Could not open " << filename << " for reading!")
DUNE_THROW automatically adds information about the exception thrown to the text. If DUNE_DEVEL_MODE is defined more detail about the function where the exception happened is included. This mode can be activated via the --enable-dunedevel
switch of ./configure
Referenced by Dune::Array< T >::Array(), Dune::DebugStream< thislevel, dlevel, alevel, activator >::attach(), Dune::DebugStream< thislevel, dlevel, alevel, activator >::detach(), Dune::FieldMatrix< K, n, m >::determinant(), Dune::Timer::elapsed(), Dune::FieldMatrix< T, n, m >::exists(), Dune::genFilename(), Dune::DoubleLinkedList< T >::insert_after(), Dune::DoubleLinkedList< T >::insert_before(), Dune::FieldMatrix< K, 1, 1 >::invert(), Dune::FieldMatrix< K, n, m >::invert(), Dune::FieldMatrix< T, n, m >::mmhv(), Dune::FieldMatrix< T, n, m >::mmtv(), Dune::FieldMatrix< T, n, m >::mmv(), Dune::FieldMatrix< T, n, m >::mv(), Dune::bigunsignedint< k >::operator/(), Dune::Array< T >::operator=(), Dune::FieldVector< K, 1 >::operator[](), Dune::FieldVector< T, s >::operator[](), Dune::FieldMatrix< K, 1, 1 >::operator[](), Dune::FieldMatrix< T, n, m >::operator[](), Dune::ConfigParser::parseFile(), Dune::Stack< T >::pop(), Dune::DebugStream< thislevel, dlevel, alevel, activator >::pop(), Dune::Timer::reset(), Dune::Array< T >::resize(), Dune::FieldMatrix< K, 1, 1 >::solve(), Dune::FieldMatrix< K, n, m >::solve(), Dune::Stack< T >::top(), Dune::FieldMatrix< T, n, m >::umhv(), Dune::FieldMatrix< T, n, m >::umtv(), Dune::FieldMatrix< T, n, m >::umv(), Dune::DebugStream< thislevel, dlevel, alevel, activator >::untie(), Dune::FieldMatrix< T, n, m >::usmhv(), Dune::FieldMatrix< T, n, m >::usmtv(), Dune::FieldMatrix< T, n, m >::usmv(), Dune::DebugStream< thislevel, dlevel, alevel, activator >::~DebugStream(), Dune::fmatrix_assigner< T, n, m >::~fmatrix_assigner(), and Dune::fvector_assigner< T, s >::~fvector_assigner().