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)
Macro to throw an exception
1 #include <dune/common/exceptions.hh>
- Parameters
-
E | exception class derived from Dune::Exception |
m | reason for this exception in ostream-notation |
Example:
2 DUNE_THROW(FileError, "Could not open " << filename << " for reading!");
DUNE_THROW automatically adds information about the exception thrown to the text.
- Note
- you can add a hook to be called before a Dune::Exception is emitted, e.g. to add additional information to the exception, or to invoke a debugger during parallel debugging. (see Dune::ExceptionHook)
Referenced by Dune::fmatrix_assigner< T, n, m >::append(), Dune::DebugStream< thislevel, dlevel, alevel, activator >::attach(), Dune::bigunsignedint< k >::bigunsignedint(), Dune::BitSetVector< block_size, Allocator >::BitSetVector(), Dune::InterfaceBuilder::buildInterface(), Dune::CollectiveCommunication< MPI_Comm >::CollectiveCommunication(), Dune::DebugStream< thislevel, dlevel, alevel, activator >::detach(), Dune::FMatrixHelp::eigenValues(), Dune::FMatrixHelp::eigenValuesLapackCall(), Dune::DynamicMatrixHelp::eigenValuesNonSym(), Dune::FMatrixHelp::eigenValuesNonSym(), Dune::DynamicMatrixHelp::eigenValuesNonsymLapackCall(), Dune::FMatrixHelp::eigenValuesNonsymLapackCall(), Dune::DiagonalMatrix< K, n >::exists(), Dune::DenseMatrix< FieldMatrix< T, ROWS, COLS > >::exists(), Dune::MPIGuard::finalize(), Dune::formatString(), Dune::ParameterTree::get(), Dune::RemoteIndexListModifier< T, A, mode >::insert(), Dune::DiagonalMatrix< K, n >::mmhv(), Dune::DenseMatrix< FieldMatrix< T, ROWS, COLS > >::mmhv(), Dune::DiagonalMatrix< K, n >::mmtv(), Dune::DenseMatrix< FieldMatrix< T, ROWS, COLS > >::mmtv(), Dune::DiagonalMatrix< K, n >::mmv(), Dune::DenseMatrix< FieldMatrix< T, ROWS, COLS > >::mmv(), Dune::DenseMatrix< FieldMatrix< T, ROWS, COLS > >::mtv(), Dune::DiagonalMatrix< K, n >::mv(), Dune::DenseMatrix< FieldMatrix< T, ROWS, COLS > >::mv(), operator int(), Dune::bigunsignedint< k >::operator/(), Dune::ParameterTree::operator[](), Dune::DiagonalRowVectorConst< K, n >::operator[](), Dune::DiagonalRowVector< K, DiagonalMatrixType::rows >::operator[](), Dune::ParameterTree::Parser< std::bitset< n > >::parse(), Dune::ParameterTree::parseRange(), Dune::DebugStream< thislevel, dlevel, alevel, activator >::pop(), Dune::ParameterTreeParser::readINITree(), Dune::ParameterTreeParser::readNamedOptions(), Dune::ParameterTreeParser::readOptions(), Dune::relativePath(), Dune::RemoteIndexListModifier< T, A, mode >::remove(), Dune::RemoteIndexListModifier< T, A, mode >::repairLocalIndexPointers(), Dune::ParameterTree::sub(), Dune::DebugStream< thislevel, dlevel, alevel, activator >::tie(), Dune::lru< _Key, _Tp, _Traits >::touch(), Dune::DiagonalMatrix< K, n >::umhv(), Dune::DenseMatrix< FieldMatrix< T, ROWS, COLS > >::umhv(), Dune::DiagonalMatrix< K, n >::umtv(), Dune::DenseMatrix< FieldMatrix< T, ROWS, COLS > >::umtv(), Dune::DiagonalMatrix< K, n >::umv(), Dune::DenseMatrix< FieldMatrix< T, ROWS, COLS > >::umv(), Dune::DebugStream< thislevel, dlevel, alevel, activator >::untie(), Dune::DiagonalMatrix< K, n >::usmhv(), Dune::DenseMatrix< FieldMatrix< T, ROWS, COLS > >::usmhv(), Dune::DiagonalMatrix< K, n >::usmtv(), Dune::DenseMatrix< FieldMatrix< T, ROWS, COLS > >::usmtv(), Dune::DiagonalMatrix< K, n >::usmv(), Dune::DenseMatrix< FieldMatrix< T, ROWS, COLS > >::usmv(), Dune::DebugStream< thislevel, dlevel, alevel, activator >::~DebugStream(), Dune::fmatrix_assigner< T, n, m >::~fmatrix_assigner(), and Dune::fvector_assigner< T, s >::~fvector_assigner().