summaryrefslogtreecommitdiff
path: root/src/error.h
blob: f0a67a52f137e53190bf0a1e406ff98eaaea7761 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

#include <string>

typedef unsigned int ErrCode;

#define NOERR 0
#define ERR_NON_FATAL 110
#define ERR_FATAL 120
#define CFG_ERR_NON_FATAL 210
#define CFG_ERR_KEYBIND 211
#define CFG_ERR_FATAL 220
#define CMD_ERR_NON_FATAL 310
#define CMD_ERR_NOT_FOUND 311
#define CMD_ERR_WRONG_ARGS 312
#define CMD_ERR_FATAL 320
struct Err
{
	ErrCode code;
	std::string message;
	Err(ErrCode code, std::string message)
	{
		this->code = code;
		this->message = message;
	}
};