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 
00179 class REBECCA_EXPORT RecursionException : public Exception
00180 {
00181     public:
00182         
00186         virtual ~RecursionException() { } 
00187 };
00188 
00189 
00217 class REBECCA_EXPORT InternalProgrammerErrorException : public Exception
00218 {
00219     public:
00223         virtual ~InternalProgrammerErrorException() { } 
00224 };
00225 
00226 } //end of namespace impl
00227 
00228 //expose the exception handlers to rebecca namespace
00229 using rebecca::impl::Exception;
00230 using rebecca::impl::IllegalArgumentException;
00231 using rebecca::impl::FileNotFoundException;
00232 using rebecca::impl::DirectoryNotFoundException;
00233 using rebecca::impl::InitializationException;
00234 using rebecca::impl::XMLErrorException;
00235 using rebecca::impl::InternalProgrammerErrorException;
00236 using rebecca::impl::RecursionException;
00237 } //end of namespace rebecca
00238 
00239 
00240 #endif

Generated on Sat Mar 4 23:31:49 2006 for RebeccaAIML by  doxygen 1.4.5