Exceptions.h

00001 #ifndef REBECCA_EXCEPTIONS_H
00002 #define REBECCA_EXCEPTIONS_H
00003 
00004 /*
00005  * RebeccaAIML, Artificial Intelligence Markup Language 
00006  * C++ api and engine.
00007  *
00008  * Copyright (C) 2005,2006,2007 Frank Hassanabad
00009  *
00010  * This file is part of RebeccaAIML.
00011  *
00012  * RebeccaAIML is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 3 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * RebeccaAIML is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00024  */
00025 
00026 
00027 //To get the REBECA_EXPORT macro
00028 #include <rebecca/exports.h>
00029 
00030 //See AimlFacade for the explanation of this namespace
00031 namespace rebecca 
00032 {
00033 //See AimlFacade for the explanation of this namespace
00034 namespace impl 
00035 {
00036 
00056 class REBECCA_EXPORT Exception
00057 {
00058     public:
00059 
00073         virtual const char* what() const throw() 
00074         { 
00075             return "unknown exception";
00076         }
00077 
00081         virtual ~Exception() { } 
00082 };
00083 
00093 class REBECCA_EXPORT IllegalArgumentException : public Exception
00094 { 
00095     public:
00096 
00100         virtual ~IllegalArgumentException() { } 
00101 };
00102 
00111 class REBECCA_EXPORT FileNotFoundException : public Exception
00112 { 
00113     public:
00114 
00118         virtual ~FileNotFoundException() { } 
00119 };
00120 
00129 class REBECCA_EXPORT DirectoryNotFoundException : public Exception
00130 { 
00131     public:
00132 
00136         virtual ~DirectoryNotFoundException() { }
00137 };
00138 
00149 class REBECCA_EXPORT InitializationException : public Exception
00150 {
00151     public:
00152 
00156         virtual ~InitializationException() { } 
00157 };
00158 
00166 class REBECCA_EXPORT XMLErrorException : public Exception
00167 {
00168     public:
00169 
00173         virtual ~XMLErrorException() { } 
00174 };
00175 
00180 class REBECCA_EXPORT RecursionException : public Exception
00181 {
00182     public:
00183         
00187         virtual ~RecursionException() { } 
00188 };
00189 
00195 class REBECCA_EXPORT NetworkException : public Exception
00196 {
00197     public:
00198         
00202         virtual ~NetworkException() { } 
00203 };
00204 
00211 class REBECCA_EXPORT NumberFormatException : public Exception
00212 {
00213     public:
00214         
00218         virtual ~NumberFormatException() { } 
00219 };
00220 
00248 class REBECCA_EXPORT InternalProgrammerErrorException : public Exception
00249 {
00250     public:
00254         virtual ~InternalProgrammerErrorException() { } 
00255 };
00256 
00257 } //end of namespace impl
00258 
00259 //expose the exception handlers to rebecca namespace
00260 using rebecca::impl::Exception;
00261 using rebecca::impl::IllegalArgumentException;
00262 using rebecca::impl::FileNotFoundException;
00263 using rebecca::impl::DirectoryNotFoundException;
00264 using rebecca::impl::InitializationException;
00265 using rebecca::impl::XMLErrorException;
00266 using rebecca::impl::InternalProgrammerErrorException;
00267 using rebecca::impl::RecursionException;
00268 using rebecca::impl::NetworkException;
00269 } //end of namespace rebecca
00270 
00271 
00272 #endif

Generated on Mon Aug 27 12:26:47 2007 for RebeccaAIML by  doxygen 1.5.3