|
TBCI Numerical high perf. C++ Library 2.8.0
|
exception base class for the TBCI NumLib More...
#include <except.h>


Public Member Functions | |
| NumErr () | |
| NumErr (const char *txt, const long idx=0) | |
| NumErr (const std::string &str, const long idx=0) | |
| NumErr (const NumErr &ne) | |
| virtual const char * | what () const throw () |
| virtual | ~NumErr () throw () |
Public Attributes | |
| const char * | errtext |
| Short error description in _what. | |
| long | index |
| Index for out of bounds error. | |
exception base class for the TBCI NumLib
All exceptions that are generated by the TBCI library are derived from this class.
Currently, the structure uses an exception type depending on the storage object dealt with – so there is TBCI::VecErr, TBCI::MatErr etc.
In a later version, this will be changed to a scheme, where the exception class is based on the type of exception, such as RangeError, BadAlloc, Arithmetic (e.g. div by zero), Convergence, ...
Checking for error conditions such as bound checking ... are only done if ERRCHECK is defined at compile time. Otherwise, the checks are left out for performance reasons. All these checks are implemented using the BCHK macros.
The behaviour in case of error conditions with ERRCHECK defined defaults to reporting the error to stderr / cerr, but continuing the program execution. This allows to find more than one error at a time.
If you define ABORT_ON_ERROR (additionally to ERRCHECK), the error checks will call abort() after printing out the error message. This is useful, when you want to backtrace errors with a debugger.
If you define EXCEPT (additionally to ERRCHECK), an exception is thrown on error conditions, so you might catch and handle such conditions. If you don't, the results will be similar to calling abort() ...
|
inline |
Definition at line 65 of file except.h.
References errtext, index, and STD__.
Referenced by BdMatrixErr::BdMatrixErr(), BdMatrixErr::BdMatrixErr(), BdMatrixErr::BdMatrixErr(), CRMatErr::CRMatErr(), CRMatErr::CRMatErr(), CRMatErr::CRMatErr(), CSCMatErr::CSCMatErr(), CSCMatErr::CSCMatErr(), CSCMatErr::CSCMatErr(), F_BandMatErr::F_BandMatErr(), F_BandMatErr::F_BandMatErr(), FSVecErr::FSVecErr(), FSVecErr::FSVecErr(), FSVecErr::FSVecErr(), IdxErr::IdxErr(), IdxErr::IdxErr(), IdxErr::IdxErr(), MatErr::MatErr(), MatErr::MatErr(), MatErr::MatErr(), NumErr(), SymmBdMatrixErr::SymmBdMatrixErr(), SymmBdMatrixErr::SymmBdMatrixErr(), SymmBdMatrixErr::SymmBdMatrixErr(), TensErr::TensErr(), TensErr::TensErr(), TensErr::TensErr(), VecErr::VecErr(), VecErr::VecErr(), and VecErr::VecErr().
|
inline |
|
inline |
|
inline |
|
inlinevirtual | ||||||||||||
|
inlinevirtual | ||||||||||||
| const char* NumErr::errtext |
| long NumErr::index |