Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SgException.h

Go to the documentation of this file.
00001 //----------------------------------------------------------------------------
00002 /** @file SgException.h
00003     Base class for exceptions. */
00004 //----------------------------------------------------------------------------
00005 
00006 #ifndef SG_EXCEPTION_H
00007 #define SG_EXCEPTION_H
00008 
00009 #include <exception>
00010 #include <string>
00011 #include <boost/format.hpp>
00012 
00013 //----------------------------------------------------------------------------
00014 
00015 /** Base class for exceptions. */
00016 class SgException
00017     : public std::exception
00018 {
00019 public:
00020     /** Construct with no message. */
00021     SgException();
00022 
00023     /** Construct with message. */
00024     SgException(const std::string& message);
00025 
00026     SgException(const boost::format& f);
00027 
00028     /** Destructor. */
00029     virtual ~SgException() throw();
00030 
00031     /** Implementation of std::exception::what(). */
00032     const char* what() const throw();
00033 
00034 private:
00035     std::string m_message;
00036 };
00037 
00038 //----------------------------------------------------------------------------
00039 
00040 #endif // SG_EXCEPTION_H


Sun Mar 13 2011 Doxygen 1.7.1