|
dune-common 2.12-git
|
Loading...
Searching...
No Matches
Dune::ExceptionHook Struct Referenceabstract
Base class to add a hook to the Dune::Exception. More...
#include <dune/common/exceptions.hh>
Public Member Functions | |
| virtual | ~ExceptionHook () |
| virtual void | operator() ()=0 |
Detailed Description
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
{
char * process_;
char * debugger_;
{
}
{
{
char * argv[4];
argv[3] = 0;
// execute debugger
<< argv[1] << " "
}
else // parent
{
// send application to sleep
kill(pid, SIGSTOP);
}
}
};
T endl(T... args)
This hook is registered via a static method of Dune::Exception:
try
{
...
}
catch (std::string & s) {
}
catch (Dune::Exception & e) {
}
}
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
static DUNE_EXPORT MPIHelper & instance(int &argc, char **&argv)
Get the singleton instance of the helper.
Definition mpihelper.hh:228
The documentation for this struct was generated from the following file:
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8