00001 // LICENSE: (Please see the file COPYING for details) 00002 // 00003 // NUS - Nemesis Utilities System: A C++ application development framework 00004 // Copyright (C) 2006, 2008 Otavio Rodolfo Piske 00005 // 00006 // This file is part of NUS 00007 // 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of the GNU Lesser General Public 00010 // License as published by the Free Software Foundation version 2.1 00011 // of the License. 00012 // 00013 // This library is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 // Lesser General Public License for more details. 00017 // 00018 // You should have received a copy of the GNU Lesser General Public 00019 // License along with this library; if not, write to the Free Software 00020 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00021 // 00022 #ifndef NNETWORK_EXCEPTION_H 00023 #define NNETWORK_EXCEPTION_H 00024 00029 #include "ndefs.h" 00030 #include "nexception.h" 00031 #include "nstring.h" 00032 00036 class DllDeclSpec NNetworkException: public NException { 00037 public: 00038 static const Flag UNHANDLED_EXCEPTION; 00039 static const Flag DNS_HOST_UNKNOWN; 00040 static const Flag DNS_TRY_AGAIN; 00043 static const Flag DNS_NO_ADDRESS; 00044 static const Flag DNS_NO_RECOVERY; 00046 static const Flag SOCKET_INIT_FAILED; 00047 static const Flag CONNECTION_FAILED; 00049 static const Flag SOCK_ERROR; 00059 NNetworkException(const NString &desc, const NString &host, 00060 Module module, Flag flag = UNHANDLED_EXCEPTION); 00061 00066 NString getHost(void) const; 00067 00068 protected: 00069 NString m_host; 00070 Flag m_flag; 00071 }; 00072 00073 00074 #endif // NNETWORK_EXCEPTION_H