Exception.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
3 
4  This file is part of the TerraLib - a Framework for building GIS enabled applications.
5 
6  TerraLib is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published by
8  the Free Software Foundation, either version 3 of the License,
9  or (at your option) any later version.
10 
11  TerraLib is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with TerraLib. See COPYING. If not, write to
18  TerraLib Team at <terralib-team@terralib.org>.
19  */
20 
21 /*!
22  \file te/Exception.h
23 
24  \brief TerraLib basic exception types.
25 
26  \author Gilberto Ribeiro de Queiroz
27  */
28 
29 #ifndef __TERRALIB_EXCEPTION_H__
30 #define __TERRALIB_EXCEPTION_H__
31 
32 // STL
33 #include <stdexcept>
34 #include <string>
35 
36 // Boost
37 #include <boost/exception/all.hpp>
38 
39 namespace te
40 {
41  //! Base exception class for plugin module.
42  struct Exception: virtual std::exception, virtual boost::exception { };
43 
44  //! An exception indicating that a given item was not found in a collection.
45  struct ItemNotFoundException: virtual Exception { };
46 
47  //! An exception indicating that a given item already exists in a collection.
49 
50  //! The base type for error report messages.
51  typedef boost::error_info<struct tag_error_description, std::string> ErrorDescription;
52 
53 } // end namespace te
54 
55 #endif // __TERRALIB_MODULE_EXCEPTION_H__
Base exception class for plugin module.
Definition: Exception.h:42
An exception indicating that a given item was not found in a collection.
Definition: Exception.h:45
boost::error_info< struct tag_error_description, std::string > ErrorDescription
The base type for error report messages.
Definition: Exception.h:51
URI C++ Library.
An exception indicating that a given item already exists in a collection.
Definition: Exception.h:48