#include <Matrix.h>
The MATRIX_USE_EXCEPTION_HANDLING define enables the use of exception handling using try{} catch{}. A MatrixException is thrown. The use of exception handling is very highly recommended. When it is turned off, the matrix will try to output a message and then call 'exit(1)'.
int main() { try { Matrix A(2,2); double d = A(3,1).real(); // causes an out of bounds exception } catch( MatrixException& matrix_exception ) { cout << matrix_exception << endl; } catch ( ... ) { cout << "Caught unknown exception" << endl; } return 0; }
Definition at line 94 of file Matrix.h.
Public Member Functions | |
| MatrixException (const char *msg) | |
| The constructor. | |
| MatrixException (const MatrixException &matrix_exception) | |
| The copy constructor. | |
| virtual | ~MatrixException () |
| The destuctor. | |
| std::string | GetExceptionMessage () |
| Return a copy of the exception message. | |
| operator const char * () | |
| Overload the casting operator to a string. | |
Data Fields | |
| std::string | m_ExceptionString |
| The matrix exception string. | |
| Zenautics::MatrixException::MatrixException | ( | const char * | msg | ) |
| Zenautics::MatrixException::MatrixException | ( | const MatrixException & | matrix_exception | ) |
| virtual Zenautics::MatrixException::~MatrixException | ( | ) | [inline, virtual] |
| std::string Zenautics::MatrixException::GetExceptionMessage | ( | ) |
| Zenautics::MatrixException::operator const char * | ( | ) |
| std::string Zenautics::MatrixException::m_ExceptionString |
1.5.4