NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
error.cpp File Reference
Include dependency graph for error.cpp:

Go to the source code of this file.

Functions

ErrorType getErrorType (std::exception_ptr e_ptr)
 This function obtains the error type of a catched exception and sets the last error message. More...
 
std::string getLastErrorMessage ()
 Return the last error message, which was catched by the getErrorType() function. More...
 
ErrorType getLastErrorType ()
 Return the last error type, which was catched by the getErrorType() function. More...
 
std::string errorTypeToString (ErrorType e)
 Return the error type converted to a human readable string. More...
 

Variables

Assertion _assertionHandler
 
static std::string sLastErrorMessage
 
static ErrorType nLastErrorType
 

Function Documentation

◆ errorTypeToString()

std::string errorTypeToString ( ErrorType  e)

Return the error type converted to a human readable string.

Parameters
eErrorType
Returns
std::string

Definition at line 148 of file error.cpp.

References TYPE_ABORT, TYPE_ASSERTIONERROR, TYPE_CRITICALERROR, TYPE_CUSTOMERROR, TYPE_GENERICERROR, TYPE_INTERNALERROR, TYPE_MATHERROR, TYPE_NOERROR, and TYPE_SYNTAXERROR.

Referenced by NumeReKernel::defineConst(), strfnc_getlasterror(), and FlowCtrl::try_catch().

◆ getErrorType()

ErrorType getErrorType ( std::exception_ptr  e_ptr)

This function obtains the error type of a catched exception and sets the last error message.

Parameters
e_ptrstd::exception_ptr
Returns
ErrorType

Definition at line 42 of file error.cpp.

References _lang, SyntaxError::ASSERTION_ERROR, Language::get(), mu::ParserError::GetMsg(), SyntaxError::LOOP_THROW, nLastErrorType, SyntaxError::PROCEDURE_THROW, SyntaxError::PROCESS_ABORTED_BY_USER, sLastErrorMessage, toString(), TYPE_ABORT, TYPE_ASSERTIONERROR, TYPE_CRITICALERROR, TYPE_CUSTOMERROR, TYPE_GENERICERROR, TYPE_INTERNALERROR, TYPE_MATHERROR, TYPE_NOERROR, and TYPE_SYNTAXERROR.

Referenced by FlowCtrl::try_catch().

Here is the call graph for this function:

◆ getLastErrorMessage()

std::string getLastErrorMessage ( )

Return the last error message, which was catched by the getErrorType() function.

Returns
std::string

Definition at line 121 of file error.cpp.

References sLastErrorMessage.

Referenced by strfnc_getlasterror().

◆ getLastErrorType()

ErrorType getLastErrorType ( )

Return the last error type, which was catched by the getErrorType() function.

Returns
ErrorType

Definition at line 134 of file error.cpp.

References nLastErrorType.

Referenced by strfnc_getlasterror().

Variable Documentation

◆ _assertionHandler

◆ nLastErrorType

ErrorType nLastErrorType
static

Definition at line 29 of file error.cpp.

Referenced by getErrorType(), and getLastErrorType().

◆ sLastErrorMessage

std::string sLastErrorMessage
static

Definition at line 28 of file error.cpp.

Referenced by getErrorType(), and getLastErrorMessage().