summaryrefslogtreecommitdiff
path: root/loader/client/err.hpp
blob: be82ad667bd45f25fb3847f079443b8c5c8be6eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#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" );
	}
}