Class StandardException

Inheritance Relationships

Base Type

Class Documentation

class StandardException : public ecl::Exception

Standard exception type, provides code location and error string.

This exception class utilises a default set of error flags and messages defined by the ecl. They can be coupled with the ecl exception macros for throwing to also enable debug-only throws, assure-check throws as well as rethrowing.

See also

Exception, DataException, PosixErrorHandler, Exceptions Guide.

Public Functions

StandardException(const char *loc, ErrorFlag error)

Default constructor for standard exceptions.

Parameters
  • loc – : use with the LOC macro, identifies the line and file of the code.

  • error – : enumerated exception error type.

StandardException(const char *loc, ErrorFlag error, const std::string &msg)

Constructor for standard exceptions with a custom message.

Parameters
  • loc – : use with the LOC macro, identifies the line and file of the code.

  • error – : enumerated exception error type.

  • msg – : extra detail message.

StandardException(const char *loc, const StandardException &e)

Constructor for standard exceptions that enables rethrowing of an existing exception up the hierarchy with a new code location stamp.

Parameters
  • loc – : use with the LOC macro, identifies the line and file of the code.

  • e – : a caught standard exception that is to be rethrown.

inline virtual ~StandardException()
virtual const char *what() const

Default exception handling output function.

Returns

const char* : the combined (LOC, error flag, detailed message) error string.

inline const std::string &message() const

Detailed error message associated with the exception.

Returns

std::string : the detailed message

inline const ErrorFlag &flag() const

Flag enumerating the type of exception thrown.