00001 /************************************************************************ 00002 filename: CEGUIExceptions.h 00003 created: 20/2/2004 00004 author: Paul D Turner 00005 00006 purpose: Defines exceptions used within the system 00007 *************************************************************************/ 00008 /************************************************************************* 00009 Crazy Eddie's GUI System (http://www.cegui.org.uk) 00010 Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk) 00011 00012 This library is free software; you can redistribute it and/or 00013 modify it under the terms of the GNU Lesser General Public 00014 License as published by the Free Software Foundation; either 00015 version 2.1 of the License, or (at your option) any later version. 00016 00017 This library 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 GNU 00020 Lesser General Public License for more details. 00021 00022 You should have received a copy of the GNU Lesser General Public 00023 License along with this library; if not, write to the Free Software 00024 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00025 *************************************************************************/ 00026 #ifndef _CEGUIExceptions_h_ 00027 #define _CEGUIExceptions_h_ 00028 00029 #include "CEGUIBase.h" 00030 #include "CEGUIString.h" 00031 00032 00033 // Start of CEGUI namespace section 00034 namespace CEGUI 00035 { 00040 class CEGUIEXPORT Exception 00041 { 00042 public: 00043 /************************************************************************* 00044 Construction and Destruction 00045 *************************************************************************/ 00046 Exception(const String& message); 00047 virtual ~Exception(void); 00048 00056 const String& getMessage(void) const {return d_message;} 00057 00058 00059 protected: 00060 String d_message; 00061 }; 00062 00067 class CEGUIEXPORT GenericException : public Exception 00068 { 00069 public: 00070 /************************************************************************* 00071 Construction and Destruction 00072 *************************************************************************/ 00073 GenericException(const String& message) : Exception(message) {} 00074 }; 00075 00080 class CEGUIEXPORT UnknownObjectException : public Exception 00081 { 00082 public: 00083 /************************************************************************* 00084 Construction and Destruction 00085 *************************************************************************/ 00086 UnknownObjectException(const String& message) : Exception(message) {} 00087 }; 00088 00093 class CEGUIEXPORT InvalidRequestException : public Exception 00094 { 00095 public: 00096 /************************************************************************* 00097 Construction and Destruction 00098 *************************************************************************/ 00099 InvalidRequestException(const String& message) : Exception(message) {} 00100 }; 00101 00106 class CEGUIEXPORT FileIOException : public Exception 00107 { 00108 public: 00109 /************************************************************************* 00110 Construction and Destruction 00111 *************************************************************************/ 00112 FileIOException(const String& message) : Exception(message) {} 00113 }; 00114 00119 class CEGUIEXPORT RendererException : public Exception 00120 { 00121 public: 00122 /************************************************************************* 00123 Construction and Destruction 00124 *************************************************************************/ 00125 RendererException(const String& message) : Exception(message) {} 00126 }; 00127 00132 class CEGUIEXPORT AlreadyExistsException : public Exception 00133 { 00134 public: 00135 /************************************************************************* 00136 Construction and Destruction 00137 *************************************************************************/ 00138 AlreadyExistsException(const String& message) : Exception(message) {} 00139 }; 00140 00145 class CEGUIEXPORT MemoryException : public Exception 00146 { 00147 public: 00148 /************************************************************************* 00149 Construction and Destruction 00150 *************************************************************************/ 00151 MemoryException(const String& message) : Exception(message) {} 00152 }; 00153 00158 class CEGUIEXPORT NullObjectException : public Exception 00159 { 00160 public: 00161 /************************************************************************* 00162 Construction and Destruction 00163 *************************************************************************/ 00164 NullObjectException(const String& message) : Exception(message) {} 00165 }; 00166 00171 class CEGUIEXPORT ObjectInUseException : public Exception 00172 { 00173 public: 00174 /************************************************************************* 00175 Construction and Destruction 00176 *************************************************************************/ 00177 ObjectInUseException(const String& message) : Exception(message) {} 00178 }; 00179 00180 00181 } // End of CEGUI namespace section 00182 00183 00184 #endif // end of guard _CEGUIExceptions_h_