All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::common::Exception Class Reference

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

#include <Exception.h>

Inheritance diagram for te::common::Exception:
te::common::LoggedException

Public Member Functions

virtual int code () const throw ()
 It gets the exception code. More...
 
 Exception () throw ()
 Default constructor. More...
 
 Exception (const std::string &what, int code=UNKNOWN_EXCEPTION) throw ()
 It initializes a new Exception. More...
 
 Exception (const char *const what, int code=UNKNOWN_EXCEPTION) throw ()
 It initializes a new Exception. More...
 
virtual const char * getClassName () const throw ()
 It return the exception class name. More...
 
virtual const char * what () const throw ()
 It outputs the exception message. More...
 
virtual ~Exception () throw ()
 Destructor. More...
 

Protected Attributes

int m_code
 The internal exception code. More...
 
std::string m_msg
 The internal exception message. More...
 

Detailed Description

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

What is an Exception?

  • It can be an error during a processing function: like out-of-memory, wrong path, wrong calculus;
  • It can be triggered by a missed value or pointer;
  • It can be triggered by a parameter out of range.

In other words, it can be any exception thrown by TerraLib when something goes wrong.

Note
TerraLib Exception class is a subclass of std::exception.
In future we must revisit this class and remove the embbed std::string.

Definition at line 58 of file Exception.h.

Constructor & Destructor Documentation

te::common::Exception::Exception ( )
throw (
)

Default constructor.

Definition at line 32 of file Exception.cpp.

te::common::Exception::Exception ( const std::string &  what,
int  code = UNKNOWN_EXCEPTION 
)
throw (
)
explicit

It initializes a new Exception.

Parameters
whatA brief description of what has raised the exception.

Definition at line 37 of file Exception.cpp.

te::common::Exception::Exception ( const char *const  what,
int  code = UNKNOWN_EXCEPTION 
)
throw (
)
explicit

It initializes a new Exception.

Parameters
whatA brief description of what has raised the exception.

Definition at line 43 of file Exception.cpp.

te::common::Exception::~Exception ( )
throw (
)
virtual

Destructor.

Definition at line 49 of file Exception.cpp.

Member Function Documentation

int te::common::Exception::code ( ) const
throw (
)
virtual

It gets the exception code.

Returns
The exception code.

Definition at line 53 of file Exception.cpp.

Referenced by te::attributefill::VectorToVectorMemory::run().

const char * te::common::Exception::getClassName ( ) const
throw (
)
virtual

It return the exception class name.

Returns
the exception class name.

Reimplemented in te::common::LoggedException.

Definition at line 63 of file Exception.cpp.

Referenced by te::common::operator<<().

const char * te::common::Exception::what ( ) const
throw (
)
virtual

It outputs the exception message.

Returns
The exception message.

Definition at line 58 of file Exception.cpp.

Referenced by te::qt::widgets::DataSetTableView::addColumn(), te::rp::FeederConstRasterDirectory::applyGeometryRestriction(), te::qt::widgets::DataSetTableView::changeColumnData(), te::qt::plugins::terralib4::TL4ConverterWizard::commit(), te::rp::Contrast::execDecorrelationEnhancement(), te::rp::PCAFusion::execute(), te::qt::widgets::ObservationWizard::finish(), te::qt::widgets::TimeSeriesWizard::finish(), te::qt::widgets::TrajectoryWizard::finish(), te::qt::af::BaseApplication::init(), te::rp::PCAFusion::loadRessampledRaster(), te::rp::FeederConstRasterDirectory::moveNext(), te::rp::FeederConstRasterDirectory::moveTo(), te::qt::widgets::QueryDataSourceDialog::onApplySelToolButtonClicked(), te::qt::widgets::QueryDataSourceDialog::onCreateLayerToolButtonClicked(), te::qt::plugins::cellspace::CreateCellularSpaceDialog::onCreatePushButtonClicked(), te::qt::widgets::SymbolSelectorDialog::onLoadSymbolLibraryPushButtonPressed(), te::attributefill::VectorToVectorDialog::onOkPushButtonClicked(), te::qt::af::BaseApplication::onOpenProjectTriggered(), te::qt::plugins::edit::ToolBar::onSaveActivated(), te::common::operator<<(), te::qt::widgets::DataSetTableView::removeColumn(), te::qt::widgets::DataSetTableView::renameColumn(), te::rp::FeederConstRasterDirectory::reset(), te::attributefill::VectorToVectorMemory::run(), te::attributefill::VectorToVectorOp::save(), te::qt::widgets::DataSetTableView::saveEditions(), te::qt::widgets::DataSetTableModel::setData(), and te::qt::widgets::DataSetTableView::sortByColumns().

Member Data Documentation

int te::common::Exception::m_code
protected

The internal exception code.

Definition at line 105 of file Exception.h.

std::string te::common::Exception::m_msg
protected

The internal exception message.

Definition at line 106 of file Exception.h.


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