TAPs 0.7.7.3
TAPsException.hpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsException.hpp
00003 ******************************************************************************/
00007 /******************************************************************************
00008 SUKITTI PUNAK   (03/26/2010)
00009 UPDATE          (04/15/2010)
00010 ******************************************************************************/
00011 #ifndef TAPs_EXCEPTION_HPP
00012 #define TAPs_EXCEPTION_HPP
00013 
00014 #include "TAPsDef.hpp"
00015 #include <exception>
00016 
00017 BEGIN_NAMESPACE_TAPs
00018 //=============================================================================
00019 class Exception : public std::exception {
00020 //=============================================================================
00021 public:
00022 
00027     enum Type {
00028         ERROR_FOUND,
00029         UNDEFINED_EXCEPTION,
00030         FILE_CANNOT_BE_OPENED,
00031         BAD_FORMAT,
00032         CANNOT_CREATE_AN_OBJECT,
00033         CANNOT_ALLOCATE_MEMORY,
00034     };
00035 
00036     //---------------------------------------------------------------
00037     // Inherited from std::exception class
00038 
00040     Exception ( enum Type e = UNDEFINED_EXCEPTION, std::string const & fileName = "", int lineNumber = -1, std::string const & massage = "" ) throw();
00041 
00043     Exception ( const Exception & E ) throw();
00044 
00046     Exception & operator= ( const Exception & E ) throw();
00047 
00049     virtual ~Exception () throw();
00050 
00052     virtual const char * what () const throw();
00053 
00055     virtual std::string What () const throw();
00056 
00058     void AddMessage ( std::string const & msg ) throw();
00059 
00060     //---------------------------------------------------------------
00061 
00062 protected:
00063     static std::string g_Description[]; 
00064 
00065     enum Type m_Type;   
00066     int Line;           
00067     std::string File;   
00068     std::string Message;    
00069 
00070 //=============================================================================
00071 }; // END CLASS Exception
00072 //=============================================================================
00073 END_NAMESPACE_TAPs
00074 //-----------------------------------------------------------------------------
00076 //#include "TAPsException.cpp"
00077 
00079 // Include definition if TAPs_USE_EXPORT is not defined
00080 #if !defined( TAPs_USE_EXPORT )
00081     #include "TAPsException.cpp"
00082 #endif
00083 //-----------------------------------------------------------------------------
00084 #endif
00085 //34567890123456789012345678901234567890123456789012345678901234567890123456789
00086 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines