Public Member Functions | Private Attributes
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]

List of all members.

Public Member Functions

const ErrorFlagflag () const
 Flag enumerating the type of exception thrown.
 StandardException (const char *loc, ErrorFlag error)
 Default constructor for standard exceptions.
 StandardException (const char *loc, ErrorFlag error, const std::string &msg)
 StandardException (const char *loc, const StandardException &e)
const char * what () const throw ()
virtual ~StandardException () throw ()

Private Attributes

const ErrorFlag error_flag
std::string message

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 54 of file standard_exception.hpp.


Constructor & Destructor Documentation

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 31 of file standard_exception.cpp.

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 36 of file standard_exception.cpp.

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 42 of file standard_exception.cpp.

virtual ecl::StandardException::~StandardException ( ) throw () [inline, virtual]

Definition at line 78 of file standard_exception.hpp.


Member Function Documentation

const ErrorFlag& ecl::StandardException::flag ( ) const [inline]

Flag enumerating the type of exception thrown.

Definition at line 87 of file standard_exception.hpp.

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 50 of file standard_exception.cpp.


Member Data Documentation

Definition at line 90 of file standard_exception.hpp.

std::string ecl::StandardException::message [private]

Definition at line 91 of file standard_exception.hpp.


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


ecl_exceptions
Author(s): Daniel Stonier (d.stonier@gmail.com)
autogenerated on Thu Jan 2 2014 11:11:54