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 Frank Hassanabad
00009  *
00010  * This library is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU Lesser General Public
00012  * License as published by the Free Software Foundation; either
00013  * version 2.1 of the License, or (at your option) any later version.
00014  *
00015  * This library is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  * Lesser General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU Lesser General Public
00021  * License along with this library; if not, write to the Free Software
00022  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00023  */
00024 
00025 
00026 //To get the REBECA_EXPORT macro
00027 #include <rebecca/exports.h>
00028 
00029 //See AimlFacade for the explanation of this namespace
00030 namespace rebecca 
00031 {
00032 //See AimlFacade for the explanation of this namespace
00033 namespace impl 
00034 {
00035 
00055 class REBECCA_EXPORT Exception
00056 {
00057     public:
00058 
00072         virtual const char* what() const throw() 
00073         { 
00074             return "unknown exception";
00075         }
00076 
00080         virtual ~Exception() { } 
00081 };
00082 
00092 class REBECCA_EXPORT IllegalArgumentException : public Exception
00093 { 
00094     public:
00095 
00099         virtual ~IllegalArgumentException() { } 
00100 };
00101 
00110 class REBECCA_EXPORT FileNotFoundException : public Exception
00111 { 
00112     public:
00113 
00117         virtual ~FileNotFoundException() { } 
00118 };
00119 
00128 class REBECCA_EXPORT DirectoryNotFoundException : public Exception
00129 { 
00130     public:
00131 
00135         virtual ~DirectoryNotFoundException() { }
00136 };
00137 
00148 class REBECCA_EXPORT InitializationException : public Exception
00149 {
00150     public:
00151 
00155         virtual ~InitializationException() { } 
00156 };
00157 
00165 class REBECCA_EXPORT XMLErrorException : public Exception
00166 {
00167     public:
00168 
00172         virtual ~XMLErrorException() { } 
00173 };
00174 
00203 class REBECCA_EXPORT InternalProgrammerErrorException : public Exception
00204 {
00205     public:
00209         virtual ~InternalProgrammerErrorException() { } 
00210 };
00211 
00212 
00213 } //end of namespace impl
00214 
00215 //expose the exception handlers to rebecca namespace
00216 using rebecca::impl::Exception;
00217 using rebecca::impl::IllegalArgumentException;
00218 using rebecca::impl::FileNotFoundException;
00219 using rebecca::impl::DirectoryNotFoundException;
00220 using rebecca::impl::InitializationException;
00221 using rebecca::impl::XMLErrorException;
00222 using rebecca::impl::InternalProgrammerErrorException;
00223 
00224 } //end of namespace rebecca
00225 
00226 
00227 #endif

Generated on Wed Oct 12 23:40:33 2005 for RebeccaAIML by  doxygen 1.4.5