Exceptions.h

00001 #ifndef PIRCBOT_EXCEPTIONS_H
00002 #define PIRCBOT_EXCEPTIONS_H
00003 
00004 /*
00005  * pircbotcpp, C++ port of the pircbot Java version
00006  * A IRC C++ software development kit. An Object 
00007  * Oriented client framework which lets you 
00008  * write quick and easy C++ IRC bots
00009  *
00010  * Copyright (C) 2006 Frank Hassanabad 
00011  * http://pircbotcpp.sourceforge.net/
00012  *
00013  * Java version 
00014  * Copyright Paul James Mutton, 2001-2004, http://www.jibble.org/
00015  *
00016  * This library is free software; you can redistribute it and/or
00017  * modify it under the terms of the GNU General Public
00018  * License as published by the Free Software Foundation; either
00019  * version 2.1 of the License, or (at your option) any later version.
00020  *
00021  * This library is distributed in the hope that it will be useful,
00022  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00023  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00024  * General Public License for more details.
00025  *
00026  * You should have received a copy of the GNU General Public
00027  * License along with this library; if not, write to the Free Software
00028  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00029  */
00030 
00031 //To get the REBECA_EXPORT macro
00032 #include <pircbot/exports.h>
00033 
00034 namespace pircbot
00035 {
00036 namespace impl 
00037 {
00038 
00058 class PIRCBOT_EXPORT Exception
00059 {
00060     public:
00061 
00075         virtual const char* what() const throw() 
00076         { 
00077             return "unknown exception";
00078         }
00079 
00083         virtual ~Exception() { } 
00084 };
00085 
00091 class PIRCBOT_EXPORT IOException : public Exception
00092 { 
00093     public:
00094 
00098         virtual ~IOException() { } 
00099 };
00100 
00106 class PIRCBOT_EXPORT NickAlreadyInUseException : public Exception
00107 { 
00108     public:
00109 
00113         virtual ~NickAlreadyInUseException() { } 
00114 };
00115 
00119 class PIRCBOT_EXPORT IrcException : public Exception
00120 { 
00121     public:
00122 
00126         virtual ~IrcException() { } 
00127 };
00128 
00129 
00130 
00131 } //end of namespace impl
00132 
00133 //expose the exception handlers to rebecca namespace
00134 using pircbot::impl::Exception;
00135 using pircbot::impl::IOException;
00136 using pircbot::impl::NickAlreadyInUseException;
00137 using pircbot::impl::IrcException;
00138 
00139 } //end of namespace pircbot
00140 
00141 
00142 #endif

Generated on Sun Sep 3 16:43:20 2006 for pircbotcpp by  doxygen 1.4.5