Exception.h File Reference

This class is designed to declare objects to be thrown as exceptions by TerraLib. More...

#include "Config.h"
#include "Enums.h"
#include <exception>
#include <string>

Go to the source code of this file.

Classes

class  te::common::Exception
 This class is designed to declare objects to be thrown as exceptions by TerraLib. More...
 

Namespaces

 te
 URI C++ Library.
 
 te::common
 Namespace for the Common module of TerraLib.
 

Macros

#define TE_DECLARE_EXCEPTION_CLASS(API_DECL, ClassName, BaseExceptionClass)
 This define can be used to add new exception classes to the system. More...
 
#define TE_DEFINE_EXCEPTION_CLASS(ClassName, BaseExceptionClass, ClassNameAsLiteral)
 This define can be used to add new exception classes to the system. More...
 

Functions

std::ostream & te::common::operator<< (const Exception &e, std::ostream &o)
 It serializes the exception and sends it to the output stream. More...
 

Detailed Description

This class is designed to declare objects to be thrown as exceptions by TerraLib.

Definition in file Exception.h.

Macro Definition Documentation

#define TE_DECLARE_EXCEPTION_CLASS (   API_DECL,
  ClassName,
  BaseExceptionClass 
)
Value:
class API_DECL ClassName : public virtual BaseExceptionClass \
{ \
public: \
\
ClassName() throw() { } \
\
explicit ClassName(const std::string& what, int code = te::common::UNKNOWN_EXCEPTION) throw(); \
\
explicit ClassName(const char* const what, int code = te::common::UNKNOWN_EXCEPTION) throw(); \
\
virtual ~ClassName() throw(); \
\
virtual const char* getClassName() const throw(); \
};
URI C++ Library.

This define can be used to add new exception classes to the system.

Definition at line 125 of file Exception.h.

#define TE_DEFINE_EXCEPTION_CLASS (   ClassName,
  BaseExceptionClass,
  ClassNameAsLiteral 
)
Value:
ClassName::ClassName(const std::string& what, int code) throw() \
: BaseExceptionClass(what, code) \
{ \
m_code = code; \
m_msg = what; \
} \
\
ClassName::ClassName(const char* const what, int code) throw() \
: BaseExceptionClass(what, code) \
{ \
m_code = code; \
m_msg = what; \
} \
\
ClassName::~ClassName() throw() \
{ \
} \
\
const char* ClassName::getClassName() const throw() \
{ \
return ClassNameAsLiteral; \
}

This define can be used to add new exception classes to the system.

Definition at line 144 of file Exception.h.