Public Member Functions | Private Attributes | List of all members
ecl::StandardException Class Reference

Standard exception type, provides code location and error string. More...

#include <standard_exception.hpp>

Inheritance diagram for ecl::StandardException:
Inheritance graph
[legend]

Public Member Functions

const std::string & message () const
 
 StandardException (const char *loc, const StandardException &e)
 
 StandardException (const char *loc, ErrorFlag error)
 Default constructor for standard exceptions. More...
 
 StandardException (const char *loc, ErrorFlag error, const std::string &msg)
 
const char * what () const throw ()
 
virtual ~StandardException () throw ()
 

Private Attributes

std::string detailed_message
 
const ErrorFlag error_flag
 

Additional Inherited Members

- Protected Member Functions inherited from ecl::Exception
 Exception ()
 
 Exception (const char *loc)
 
- Protected Attributes inherited from ecl::Exception
std::string location
 

Detailed Description

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.

Definition at line 62 of file standard_exception.hpp.

Constructor & Destructor Documentation

◆ StandardException() [1/3]

ecl::StandardException::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.

Definition at line 37 of file standard_exception.cpp.

◆ StandardException() [2/3]

ecl::StandardException::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.

Definition at line 42 of file standard_exception.cpp.

◆ StandardException() [3/3]

ecl::StandardException::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.

Definition at line 48 of file standard_exception.cpp.

◆ ~StandardException()

virtual ecl::StandardException::~StandardException ( )
throw (
)
inlinevirtual

Definition at line 96 of file standard_exception.hpp.

Member Function Documentation

◆ message()

const std::string& ecl::StandardException::message ( ) const
inline

Detailed error message associated with the exception.

Returns
std::string : the detailed message

Definition at line 110 of file standard_exception.hpp.

◆ what()

const char * ecl::StandardException::what ( ) const
throw (
)
virtual

Default exception handling output function.

Returns
char const* : the output message.

Implements ecl::Exception.

Definition at line 56 of file standard_exception.cpp.

Member Data Documentation

◆ detailed_message

std::string ecl::StandardException::detailed_message
private

Definition at line 116 of file standard_exception.hpp.

◆ error_flag

const ErrorFlag ecl::StandardException::error_flag
private

Definition at line 115 of file standard_exception.hpp.


The documentation for this class was generated from the following files:


ecl_exceptions
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:17