exceptions.hpp
Go to the documentation of this file.00001 #ifndef EXCEPTIONS_H
00002 #define EXCEPTIONS_H 1
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <stdexcept>
00026 #include <string>
00027
00028 #ifdef CXX_NAMESPACES
00029 namespace prf{
00030 #endif
00031
00038 class NotFoundError : public std::logic_error {
00039 public:
00040 explicit NotFoundError(std::string tname, std::string where) :
00041 std::logic_error(std::string("Element not found in the container: ") + tname + " : " + where){}
00042 };
00043
00050 class DocCreationError : public std::logic_error {
00051 public:
00052 explicit DocCreationError(std::string where) :
00053 std::logic_error(std::string("Could not create the DOMDocument instance: ") + where){}
00054 };
00055
00056 class ItemCreationError : public std::logic_error {
00057 public:
00058 explicit ItemCreationError(std::string where) :
00059 std::logic_error(std::string("Could not create the element, insertion failed: ") + where){}
00060 };
00067 class NotImplementedError : public std::logic_error {
00068 public:
00069 explicit NotImplementedError() :
00070 std::logic_error("This method or feature is not yet implemented."){}
00071 };
00072
00087 class OptionUnusable : public std::logic_error {
00088 public:
00089
00090 explicit OptionUnusable() :
00091 std::logic_error("Instance of ConfigOption is unusable: representation is uninitialized!"){ }
00092 };
00093
00094 #ifdef CXX_NAMESPACES
00095 }
00096 #endif
00097
00098 #endif
Generated on Tue May 11 05:03:49 2004 for libprf1 by
1.3.6-20040222