Skip to content
Snippets Groups Projects
Commit c4b1b118 authored by Christian Engwer's avatar Christian Engwer
Browse files

[exception] std::exception::what is virtual

parent 2c78bf88
Branches
Tags
1 merge request!2Feature/dune exception derived from std exception
......@@ -95,9 +95,9 @@ namespace Dune {
public:
Exception ();
void message(const std::string &msg); //!< store string in internal message buffer
const char* what() const noexcept; //!< output internal message buffer
virtual const char* what() const noexcept; //!< output internal message buffer
static void registerHook (ExceptionHook * hook); //!< add a functor which is called before a Dune::Exception is emitted (see Dune::ExceptionHook) \see Dune::ExceptionHook
static void clearHook (); //!< remove all hooks
static void clearHook (); //!< remove all hooks
private:
std::string _message;
static ExceptionHook * _hook;
......@@ -199,7 +199,7 @@ namespace Dune {
_message = msg;
}
inline const char* Exception::what() const noexcept
const char* Exception::what() const noexcept
{
return _message.data();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment