Base class to add a hook to the Dune::Exception.
More...
#include <dune/common/exceptions.hh>
Base class to add a hook to the Dune::Exception.
The user can add a functor which should be called before a Dune::Exception is emitted.
Example: attach a debugger to the process, if an exception is thrown
{
{
}
{
{
std::cout <<
argv[0] <<
" "
}
else
{
kill(pid, SIGSTOP);
}
}
};
A dynamically growing random access list.
Definition arraylist.hh:62
Base class to add a hook to the Dune::Exception.
Definition exceptions.hh:174
This hook is registered via a static method of Dune::Exception:
try
{
...
}
catch (std::string &
s) {
std::cout <<
mpihelper.rank() <<
": ERROR: " <<
s << std::endl;
}
std::cout << mpihelper.
rank() <<
": DUNE ERROR: " << e.
what() << std::endl;
}
}
int main(int argc, char **argv)
Definition mpi_collective_benchmark.cc:293
static void registerHook(ExceptionHook *hook)
add a functor which is called before a Dune::Exception is emitted (see Dune::ExceptionHook)
Definition exceptions.cc:22
const char * what() const noexcept override
output internal message buffer
Definition exceptions.cc:37
Base class for Dune-Exceptions.
Definition exceptions.hh:96
A real mpi helper.
Definition mpihelper.hh:179
static DUNE_EXPORT MPIHelper & instance()
Definition mpihelper.hh:258
int rank() const
return rank of process
Definition mpihelper.hh:268
The documentation for this struct was generated from the following file: