Tool::Exception Class Reference

Exception Class. More...

#include <Exception.hpp>

Inheritance diagram for Tool::Exception:
Tool::Message

List of all members.

Public Member Functions

 Exception ()
 Default Constructor. Creates a Message with an empty author, empty message, the Default MessageType and the creation time.
 Exception (const Exception &exception)
 Copy Constructor Creates an identical Exception.
 Exception (const std::string &header, const std::string &description, const std::string &sourcefile, unsigned linenumber)
 Exception Constructor. Creates a new Exception, with the specified header description, sourcefile, and linenumber. The creation time will be automaticly added.
virtual Exceptionoperator= (const Exception &exception)
 Copy Operator. Copies the data from the specified Exception.
const std::string & getHeader () const
 Get's the header of the Exception.
const std::string & getDescription () const
 Get's the description of the Exception.
const std::string & getSourceFile () const
 Get's the sourcefile where the Exception occured.
const unsigned & lineNumber () const
 Get's the number of the line where the Exception occured.
const boost::posix_time::ptime & getTime () const
 Get's the creation time of the Exception.
Message convertToMessage () const

Static Public Member Functions

static std::string convertToString (const boost::posix_time::ptime &time, const std::string &format)
 Formats the boost::posix_time as specified.

Detailed Description

Exception Class.

Contains detailed information about the exception:
A brief Header, detailed description, source-file, linenumber and the time/date.


Member Function Documentation

std::string Tool::Exception::convertToString ( const boost::posix_time::ptime &  time,
const std::string &  format 
) [static]

Formats the boost::posix_time as specified.

Parameters:
format how the time should be formated
Returns:
the formated time string or an empty string if failed

Reimplemented from Tool::Message.

const std::string & Tool::Exception::getDescription (  )  const

Get's the description of the Exception.

Returns:
the header
const std::string & Tool::Exception::getHeader (  )  const

Get's the header of the Exception.

Returns:
the header
const std::string & Tool::Exception::getSourceFile (  )  const

Get's the sourcefile where the Exception occured.

Returns:
the header
const boost::posix_time::ptime & Tool::Exception::getTime (  )  const

Get's the creation time of the Exception.

Returns:
the creation time

Reimplemented from Tool::Message.

const unsigned & Tool::Exception::lineNumber (  )  const

Get's the number of the line where the Exception occured.

Returns:
the header

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

Generated by  doxygen 1.6.2