summaryrefslogtreecommitdiff
path: root/loader/client/err.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'loader/client/err.hpp')
-rw-r--r--loader/client/err.hpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/loader/client/err.hpp b/loader/client/err.hpp
new file mode 100644
index 0000000..5a6691d
--- /dev/null
+++ b/loader/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