Base Framework
Public Member Functions | Protected Attributes | List of all members
ExpressionException Class Reference

Expression exception. More...

#include <base/math/ExpressionException.h>

Inherits Exception.

Public Member Functions

 ExpressionException () noexcept
 
 ExpressionException (const char *message) noexcept
 
 ExpressionException (unsigned int index, const char *message) noexcept
 
 ExpressionException (const Type &type) noexcept
 
 ExpressionException (const char *message, const Type &type) noexcept
 
unsigned int getIndex () const noexcept
 
- Public Member Functions inherited from Exception
 Exception () noexcept
 
 Exception (const char *message) noexcept
 
 Exception (const Type &type) noexcept
 
 Exception (const char *message, const Type &type) noexcept
 
 Exception (const Exception &copy) noexcept
 
 Exception (Exception &&move) noexcept
 
unsigned int getCause () const noexcept
 
void setCause (unsigned int cause) noexcept
 
unsigned int getError () const noexcept
 
void setError (unsigned int error) noexcept
 
const char * getMessage () const noexcept
 
void setMessage (const char *message) noexcept
 
template<decltype(sizeof(void *)) SIZE>
void setMessage (const char(&_message)[SIZE]) noexcept
 
virtual Type getThisType () const noexcept
 
const TypegetType () const noexcept
 
void setType (const Type &type) noexcept
 
virtual bool isCommonException () const noexcept
 
OwnedNativeString getHTML () const
 
virtual ~Exception () noexcept
 

Protected Attributes

unsigned int index = 0
 

Additional Inherited Members

- Public Types inherited from Exception
enum  DumpOnThrow { DUMP_ON_THROW_NO = 0, DUMP_ON_THROW_EXCEPTION, DUMP_ON_THROW_STACK }
 
typedef void(* ExceptionHandler) (const Exception *exception)
 
- Static Public Member Functions inherited from Exception
static void onThrow (const Exception &exception) noexcept
 
static void rethrow ()
 
static bool getDumpExceptions () noexcept
 
static void setDumpExceptions (bool _dumpExceptions) noexcept
 
static ExceptionHandler setExceptionHandler (ExceptionHandler _exceptionHandler) noexcept
 
static bool hasPendingException () noexcept
 
static bool isUnwinding () noexcept
 
static unsigned int getPendingExceptions () noexcept
 
static const char * getStdExceptionName (const std::exception &e) noexcept
 
static Type getExceptionType () noexcept
 
static StackTrace getStackTrace ()
 
static void setDumpOnThrow (DumpOnThrow dumpOnThrow) noexcept
 
- Static Public Attributes inherited from Exception
static constexpr bool SUPPORTS_EXCEPTIONS = true
 

Detailed Description

Expression exception.

This exception is raised by ExpressionParser on errors in an expression representation.

See also
ExpressionParser
Version
1.0
Examples
testsuite/eval.cpp.

Constructor & Destructor Documentation

◆ ExpressionException() [1/5]

ExpressionException::ExpressionException ( )
noexcept

Initializes the exception with no message.

◆ ExpressionException() [2/5]

ExpressionException::ExpressionException ( const char *  message)
noexcept

Initializes the exception with the specified message.

Parameters
messageThe message.

◆ ExpressionException() [3/5]

ExpressionException::ExpressionException ( unsigned int  index,
const char *  message 
)
noexcept

Initializes the exception with the specified index and message.

Parameters
indexThe index of the error.
messageThe message.

◆ ExpressionException() [4/5]

ExpressionException::ExpressionException ( const Type type)
inlinenoexcept

Initializes the exception object without an associated message.

Parameters
typeThe identity of the type.

◆ ExpressionException() [5/5]

ExpressionException::ExpressionException ( const char *  message,
const Type type 
)
inlinenoexcept

Initializes the exception object.

Parameters
messageAn NULL-terminated string (ASCII).
typeThe identity of the type.

Member Function Documentation

◆ getIndex()

unsigned int ExpressionException::getIndex ( ) const
inlinenoexcept

Returns the index of the error in the expression representation.

Examples
testsuite/eval.cpp.

Member Data Documentation

◆ index

unsigned int ExpressionException::index = 0
protected

Specifies the index the error in the expression representation.