diff options
| author | JustSomePwner <crotchyalt@gmail.com> | 2018-08-30 14:01:54 +0200 |
|---|---|---|
| committer | JustSomePwner <crotchyalt@gmail.com> | 2018-08-30 14:01:54 +0200 |
| commit | 7ccb819f867493f8ec202ea3b39c94c198c64584 (patch) | |
| tree | 94622e61af0ff359e3d6689cf274d74f60b2492a /client/err.hpp | |
| parent | 564d979b79e8a5aaa5014eba0ecd36c61575934f (diff) | |
first
Diffstat (limited to 'client/err.hpp')
| -rw-r--r-- | client/err.hpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/client/err.hpp b/client/err.hpp new file mode 100644 index 0000000..5a6691d --- /dev/null +++ b/client/err.hpp @@ -0,0 +1,22 @@ +#pragma once
+#include "strings.hpp"
+
+namespace err
+{
+ enum ErrCode_t {
+ ERR_NONE = 0,
+ ERR_WSA = 1,
+ ERR_CONNECT = 2,
+ };
+
+ const char* translate_err( int code ) {
+ switch( code ) {
+ case ERR_WSA:
+ return xors( "socket error" );
+ case ERR_CONNECT:
+ return xors( "connection error" );
+ }
+
+ return xors( "unknown error" );
+ }
+}
\ No newline at end of file |
