00001 #ifndef CUSTOMHTML_WEBPAGE_H 00002 #define CUSTOMHTML_WEBPAGE_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 namespace customTag 00026 { 00027 namespace impl 00028 { 00029 00035 class HtmlConverterException : public Exception 00036 { 00037 public: 00038 00045 HtmlConverterException(const char * const msg = "Unknown exception") 00046 : m_msg(msg) 00047 { } 00048 00053 virtual const char* what() const throw() 00054 { 00055 return m_msg.c_str(); 00056 } 00057 00058 private: 00059 00064 std::string m_msg; 00065 }; 00066 00067 00073 class HtmlConverterProgrammerErrorException : public InternalProgrammerErrorException 00074 { 00075 public: 00076 00082 HtmlConverterProgrammerErrorException() 00083 : m_exception(new HtmlConverterException) { } 00084 00091 HtmlConverterProgrammerErrorException(const char * const e) 00092 : m_exception(new HtmlConverterException(e)) 00093 { } 00094 00098 virtual const char* what() const throw() 00099 { 00100 return m_exception->what(); 00101 } 00102 00103 private: 00104 00108 shared_ptr<Exception> m_exception; 00109 }; 00110 00111 } //end of namespace impl 00112 } //end of namespace customTag 00113 00114 00115 #endif 00116