00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __EID_ERRNO__
00021 #define __EID_ERRNO__
00022
00023 namespace eid {
00027 const int E_EXTERNAL = 10;
00031 const int E_CONNECTION = 11;
00035 const int E_UNEXTYPE = 20;
00039 const int E_CAST = 30;
00043 const int E_NOMEMBER = 40;
00047 const int E_ENDOFSEQ = 50;
00051 const int E_NOSEQ = 60;
00055 const int E_UNCODE = 70;
00059 const int E_USENAME = 80;
00063 const int E_STRANGE = 90;
00067 const int E_REDIRECT = 100;
00068
00072 const char *errtostr(int err) {
00073 switch (err) {
00074 case E_EXTERNAL:
00075 return "External error";
00076 case E_CONNECTION:
00077 return "Connection error";
00078 case E_UNEXTYPE:
00079 return "Unexpected type";
00080 case E_CAST:
00081 return "Casting failed";
00082 case E_NOMEMBER:
00083 return "No such member recived";
00084 case E_ENDOFSEQ:
00085 return "Sequence reached the end";
00086 case E_NOSEQ:
00087 return "No such sequence";
00088 case E_UNCODE:
00089 return "Unexpected code";
00090 case E_USENAME:
00091 return "Unable to work with just id";
00092 case E_STRANGE:
00093 return "This error means, that is something strange going on";
00094 case E_REDIRECT:
00095 return "No data on last server. Try reconnect";
00096 }
00097 }
00098 }
00099 #endif