Mimotera::MimoteraException Class Reference

Base class of the Mimotera++ exception. More...

#include <mimotera++/MimoteraException.hh>

Inherited by Mimotera::EventNotReady, Mimotera::FileException, and Mimotera::MarkerPixelException.

List of all members.

Public Member Functions

 MimoteraException (const std::string &msg)
 Default constructor with message parameter.
const char * what () const throw ()
 Overload of the what method.
const MimoteraExceptionsetLocation (const std::string &file="", unsigned line=0, const std::string &func="") const
 Set location method.
virtual ~MimoteraException () throw ()

Protected Attributes

std::string m_msg
 The message!

Detailed Description

Base class of the Mimotera++ exception.

All Mimotera++ exceptions are inheriting from this base class.

To simplify the definition and the use of exception within the API framework four pre-processor macros have been defined:

Among the basic features of exceptions, the MimoteraException class is adding the possibility to have a custom message displayed by invoking the what() method containing also the print-out of the source file and line where this exception was thrown. This last feature is particularly helpful for developers.

Antonio Bulgheroni <antonio.bulgheroni@gmail.com>

Definition at line 119 of file MimoteraException.hh.

Constructor & Destructor Documentation

Mimotera::MimoteraException::MimoteraException ( const std::string &  msg  ) 

Default constructor with message parameter.

This is the base class for all the exceptions used by the Mimotera API.

msg The message to print out.

Definition at line 28 of file MimoteraException.cc.

virtual Mimotera::MimoteraException::~MimoteraException (  )  throw () [inline, virtual]


Definition at line 145 of file MimoteraException.hh.

Member Function Documentation

const MimoteraException & Mimotera::MimoteraException::setLocation ( const std::string &  file = "",
unsigned  line = 0,
const std::string &  func = "" 
) const

Set location method.

This method is used to define where (file name and line) the exception was thrown.

Definition at line 32 of file MimoteraException.cc.

const char* Mimotera::MimoteraException::what (  )  const throw () [inline]

Overload of the what method.

examples/convert2ASCII.cxx, examples/convert2ROOT.cxx, and examples/createDummyData.cxx.

Definition at line 132 of file MimoteraException.hh.

Member Data Documentation

std::string Mimotera::MimoteraException::m_msg [protected]

The message!

Definition at line 149 of file MimoteraException.hh.

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

Generated on Fri Sep 18 19:15:43 2009 for Mimotera++ by  doxygen