26 #ifndef __TERRALIB_COMMON_INTERNAL_EXCEPTION_H 
   27 #define __TERRALIB_COMMON_INTERNAL_EXCEPTION_H 
   87         virtual int code() 
const throw();
 
   94         virtual const char* what() 
const throw();
 
  101         virtual const char* getClassName() 
const throw();
 
  125 #define TE_DECLARE_EXCEPTION_CLASS(API_DECL, ClassName, BaseExceptionClass)                           \ 
  126   class API_DECL ClassName : public virtual BaseExceptionClass                                        \ 
  130       ClassName() throw() { }                                                                         \ 
  132       explicit ClassName(const std::string& what, int code = te::common::UNKNOWN_EXCEPTION) throw();  \ 
  134       explicit ClassName(const char* const what, int code = te::common::UNKNOWN_EXCEPTION) throw();   \ 
  136       virtual ~ClassName() throw();                                                                   \ 
  138       virtual const char* getClassName() const throw();                                               \ 
  144 #define TE_DEFINE_EXCEPTION_CLASS(ClassName, BaseExceptionClass, ClassNameAsLiteral) \ 
  145     ClassName::ClassName(const std::string& what, int code) throw()                  \ 
  146       : BaseExceptionClass(what, code)                                               \ 
  152     ClassName::ClassName(const char* const what, int code) throw()                   \ 
  153       : BaseExceptionClass(what, code)                                               \ 
  159     ClassName::~ClassName() throw()                                                  \ 
  163     const char* ClassName::getClassName() const throw()                              \ 
  165       return ClassNameAsLiteral;                                                     \ 
  168 #endif  // __TERRALIB_COMMON_INTERNAL_EXCEPTION_H 
std::ostream & operator<<(const Exception &e, std::ostream &o)
It serializes the exception and sends it to the output stream. 
 
std::string m_msg
The internal exception message. 
 
Configuration flags for the TerraLib Common Runtime module. 
 
int m_code
The internal exception code. 
 
#define TECOMMONEXPORT
You can use this macro in order to export/import classes and functions from this module. 
 
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...