00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef CONEXUSOPEN_ERROR_H
00020 #define CONEXUSOPEN_ERROR_H
00021
00022 #include <conexus/error.h>
00023
00024 namespace Conexus
00025 {
00026
00032 class open_error: public conexus_error
00033 {
00034 public:
00035 open_error(int e=0): conexus_error("Unknown error, socket cannot be created.",e,"open")
00036 { }
00037 open_error(const std::string s, int e=0): conexus_error(s,e,"open")
00038 { }
00039 }
00040 ;
00041
00042 namespace error
00043 {
00044
00045
00046 namespace open
00047 {
00048
00055 class protocol_not_supported: public open_error
00056 {
00057 public:
00058 protocol_not_supported(): open_error("The protocol type or the specified protocol is not supported within this domain.", EPROTONOSUPPORT)
00059 { }
00060 }
00061 ;
00062
00069 class af_not_supported: public open_error
00070 {
00071 public:
00072 af_not_supported(): open_error("The implementation does not support the specified address family.", EAFNOSUPPORT)
00073 { }
00074 }
00075 ;
00076
00083 class kernel_memory: public open_error
00084 {
00085 public:
00086 kernel_memory(): open_error("Not enough kernel memory to allocate a new socket structure.", ENFILE)
00087 { }
00088 }
00089 ;
00090
00097 class process_file: public open_error
00098 {
00099 public:
00100 process_file(): open_error("Process file table overflow.", EMFILE)
00101 { }
00102 }
00103 ;
00104
00111 class access: public open_error
00112 {
00113 public:
00114 access(): open_error("Permission to create a socket of the specified type and/or protocol is denied.", EACCES)
00115 { }
00116 }
00117 ;
00118
00125 class no_memory: public open_error
00126 {
00127 public:
00128 no_memory(): open_error("Insufficient memory is available. The socket cannot be created until sufficient resources are freed.", ENOBUFS)
00129 { }
00130 }
00131 ;
00132
00139 class invalid_protocol: public open_error
00140 {
00141 public:
00142 invalid_protocol(): open_error("Unknown protocol, or protocol family not available.", EINVAL)
00143 { }
00144 }
00145 ;
00146
00152 class no_device: public open_error
00153 {
00154 public:
00155 no_device(): open_error("open requested and device not available or not set.", -1)
00156 { }
00157 }
00158 ;
00159
00165 class no_filename: public open_error
00166 {
00167 public:
00168 no_filename(): open_error("open requested on file, but filename not set or file not found.", -1)
00169 { }
00170 }
00171 ;
00172
00173 }
00174
00175
00176 }
00177 }
00178
00179 #endif // CONEXUSCREATE_ERROR_H