Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
inexor::util::InexorException Class Reference

Basic exception type for use in inexor. More...

#include <InexorException.hpp>

Inheritance diagram for inexor::util::InexorException:

Public Member Functions

 InexorException ()
 Default constructor. More...
 
 InexorException (const char *s)
 Initialize this exception with a custom error message. More...
 
 InexorException (std::string s)
 Initialize this exception with a custom error message. More...
 
 InexorException (const InexorException &e)
 Initialize this exception with a custom error message in a string. More...
 
virtual const char * clazz ()
 The name of this exception class. More...
 
virtual std::string message ()
 Generates an error message appropriate for logging. More...
 
const char * what () const noexceptoverride
 

Private Attributes

std::string what_
 

Detailed Description

Basic exception type for use in inexor.

This type (1) provides an exception type that excludes all exceptions from outside inexor and (2) provides the ability to set the reason (what) when throwing the exception.

See Also
IEXCEPTION This macro allows you to subclass InexorException on the fly.

TODO: STACK TRACE TODO: Allow setting the message on the fly with the << operator

Constructor & Destructor Documentation

inexor::util::InexorException::InexorException ( )
inline

Default constructor.

Initializes what() with a generic message.

inexor::util::InexorException::InexorException ( const char *  s)
inline

Initialize this exception with a custom error message.

Parameters
sThe error message
inexor::util::InexorException::InexorException ( std::string  s)
inline

Initialize this exception with a custom error message.

Parameters
sThe error message
inexor::util::InexorException::InexorException ( const InexorException e)
inline

Initialize this exception with a custom error message in a string.

Parameters
eThe error message

Member Function Documentation

virtual const char* inexor::util::InexorException::clazz ( )
inlinevirtual

The name of this exception class.

Referenced by message().

virtual std::string inexor::util::InexorException::message ( )
inlinevirtual

Generates an error message appropriate for logging.

References clazz(), inexor::util::fmt, and what_.

const char* inexor::util::InexorException::what ( ) const
inlineoverridenoexcept

References what_.

Member Data Documentation

std::string inexor::util::InexorException::what_
private
Initial value:
= "Some problem occurred in the "
"inexor code. Dunno what."

Referenced by message(), and what().


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