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
- Parameters
-
E | exception class derived from Dune::Exception |
m | reason for this exception in ostream-notation |
Example:
if (filehandle == 0)
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::DebugStream< thislevel, dlevel, alevel, activator >::attach(), Dune::BitSetVector< block_size, Allocator >::BitSetVector(), Dune::InterfaceBuilder::buildInterface(), Dune::DebugStream< thislevel, dlevel, alevel, activator >::detach(), Dune::FMatrixHelp::eigenValues(), Dune::FMatrixHelp::eigenValuesLapackCall(), Dune::DenseMatrix< DynamicMatrix< K > >::exists(), Dune::MPIGuard::finalize(), Dune::GeometryType::GeometryType(), Dune::ParameterTree::get(), Dune::RemoteIndexListModifier< T, A, mode >::insert(), Dune::istl_assign_to_fmatrix(), Dune::DenseMatrix< DynamicMatrix< K > >::mmhv(), Dune::DenseMatrix< DynamicMatrix< K > >::mmtv(), Dune::DenseMatrix< DynamicMatrix< K > >::mmv(), Dune::DenseMatrix< DynamicMatrix< K > >::mtv(), Dune::DenseMatrix< DynamicMatrix< K > >::mv(), Dune::bigunsignedint< k >::operator/(), Dune::operator<<(), Dune::ParameterTree::operator[](), Dune::ParameterTree::Parser< T >::parse(), Dune::ParameterTree::parseRange(), Dune::FiniteStack< T, n >::pop(), Dune::DebugStream< thislevel, dlevel, alevel, activator >::pop(), Dune::ParameterTreeParser::readINITree(), 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::DenseMatrix< DynamicMatrix< K > >::umhv(), Dune::DenseMatrix< DynamicMatrix< K > >::umtv(), Dune::DenseMatrix< DynamicMatrix< K > >::umv(), Dune::DebugStream< thislevel, dlevel, alevel, activator >::untie(), Dune::DenseMatrix< DynamicMatrix< K > >::usmhv(), Dune::DenseMatrix< DynamicMatrix< K > >::usmtv(), Dune::DenseMatrix< DynamicMatrix< K > >::usmv(), Dune::DebugStream< thislevel, dlevel, alevel, activator >::~DebugStream(), Dune::fmatrix_assigner< T, n, m >::~fmatrix_assigner(), and Dune::fvector_assigner< T, s >::~fvector_assigner().