Why do we derive `ISTLError` from `Dune::MathError`? Is it better to derive from `Dune::Exception`?
Currently, we have the following situation.
//! derive error class from the base class in common
class ISTLError : public Dune::MathError {};
//! Error specific to BCRSMatrix.
class BCRSMatrixError
: public ISTLError
{};
I am working on a project that uses Dune::MathError
to track insufficient regularization. From the documentation in dune-common
it is stated for MathError
:
This is the superclass for all errors which are caused by
mathematical problems like
- matrix not invertible
- not convergent
In dune-istl
the ISTLError
and its derived classes are used for all kind of errors like index failure of BCRSMatrix
.
Therefore my question: Should this be changed that ISTLError
derives from Dune::Exception
?