fastcgi++
|
00001 00002 /*************************************************************************** 00003 * Copyright (C) 2007 Eddie Carle [eddie@erctech.org] * 00004 * * 00005 * This file is part of fastcgi++. * 00006 * * 00007 * fastcgi++ is free software: you can redistribute it and/or modify it * 00008 * under the terms of the GNU Lesser General Public License as published * 00009 * by the Free Software Foundation, either version 3 of the License, or (at * 00010 * your option) any later version. * 00011 * * 00012 * fastcgi++ is distributed in the hope that it will be useful, but WITHOUT * 00013 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * 00014 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * 00015 * License for more details. * 00016 * * 00017 * You should have received a copy of the GNU Lesser General Public License * 00018 * along with fastcgi++. If not, see <http://www.gnu.org/licenses/>. * 00019 ****************************************************************************/ 00020 00021 00022 #ifndef EXCEPTIONS_HPP 00023 #define EXCEPTIONS_HPP 00024 00025 #include <exception> 00026 00028 namespace Fastcgipp 00029 { 00031 namespace Exceptions 00032 { 00036 struct CodedException: public std::exception 00037 { 00041 const int erno; 00045 const char* msg; 00050 CodedException(const char* msg_, const int erno_): erno(erno_), msg(msg_) {} 00051 const char* what() const throw() { return msg; } 00052 }; 00053 00057 struct CodeCvt: public std::exception 00058 { 00059 const char* what() const throw() { return "Code Conversion error"; } 00060 }; 00061 } 00062 } 00063 00064 #endif