except_address.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef CONEXUSEXCEPT_ADDRESS_H
00020 #define CONEXUSEXCEPT_ADDRESS_H
00021
00022 #include <conexus/except.h>
00023 #include <netdb.h>
00024
00025 namespace Conexus
00026 {
00027
00033 class address_exception: public conexus_exception
00034 {
00035 public:
00036 address_exception(int e=0): conexus_exception("Unknown address exception.", e,"address")
00037 { }
00038 address_exception(const std::string s, int e=0): conexus_exception(s, e,"address")
00039 { }
00040 }
00041 ;
00042
00043 namespace exception
00044 {
00045
00046 namespace address
00047 {
00048
00054 class bad_string: public address_exception
00055 {
00056 public:
00057 bad_string(): address_exception("Address string is improperly formed.")
00058 { }
00059 }
00060 ;
00061
00067 class bad_netmask: public address_exception
00068 {
00069 public:
00070 bad_netmask(): address_exception("The provided value is not a valid netmask."){ }
00071 };
00072
00079 class again: public address_exception
00080 {
00081 public:
00082 again(): address_exception("The name could not be resolved at this time. Try again later.", EAI_AGAIN) { }
00083 };
00084
00091 class bad_flags: public address_exception
00092 {
00093 public:
00094 bad_flags(): address_exception("The flags parameter has an invalid value.", EAI_BADFLAGS) { }
00095 };
00096
00103 class fail: public address_exception
00104 {
00105 public:
00106 fail(): address_exception("A non-recoverable exception occurred.", EAI_FAIL) { }
00107 };
00108
00115 class memory: public address_exception
00116 {
00117 public:
00118 memory(): address_exception("Out of memory.", EAI_MEMORY) { }
00119 };
00120
00121
00130 class no_name: public address_exception
00131 {
00132 public:
00133 no_name(): address_exception("The name does not resolve for the supplied parameters.", EAI_NONAME) { }
00134 };
00135
00142 class system: public address_exception
00143 {
00144 public:
00145 system(): address_exception("A system exception occurred.", EAI_SYSTEM) { }
00146 };
00147
00154 class family: public address_exception
00155 {
00156 public:
00157 family(): address_exception("The requested address family is not supported at all.", EAI_FAMILY) { }
00158 };
00159
00166 class socket_type: public address_exception
00167 {
00168 public:
00169 socket_type(): address_exception("The requested socket type is not supported at all.", EAI_SOCKTYPE) { }
00170 };
00171
00179 class service: public address_exception
00180 {
00181 public:
00182 service(): address_exception("The requested service is not available for the requested socket type.", EAI_SERVICE) { }
00183 };
00184
00191 class address_family: public address_exception
00192 {
00193 public:
00194 address_family(): address_exception("The specified network host does not have any network addresses in the requested address family.", EAI_ADDRFAMILY) { }
00195 };
00196
00197
00204 class no_data: public address_exception
00205 {
00206 public:
00207 no_data(): address_exception("The specified network host exists, but does not have any network addresses defined.", EAI_NODATA) { }
00208 };
00209
00215 class ipv6_not_ipv4_compatible: public address_exception
00216 {
00217 public:
00218 ipv6_not_ipv4_compatible(): address_exception("Converting IPv6 address to IPv4 when address is not IPv4 compatible.") { }
00219 };
00220
00221
00222 }
00223
00224 }
00225
00226 }
00227
00228 #endif // CONEXUSBIND_ERROR_H