-
Notifications
You must be signed in to change notification settings - Fork 0
/
EAAError.cs
49 lines (42 loc) · 1.34 KB
/
EAAError.cs
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EAACP
{
internal class EAAError
{
private int ErrorNo = 0;
public Dictionary<int, string> ErrorMapping = new Dictionary<int, string>()
{
{0,"OK"},
{-1,"AstroPlanner, Cannot connect, is AstroPlanner running?" },
{1,"AstroPlanner, Bad JSON payload"},{2,"AstroPlanner, Missing script name"},{3,"AstroPlanner, Script does not exist"},{4,"AstroPlanner, Authentication string error"},
{5,"AstroPlanner, Command parameter missing"},{6,"AstroPlanner, Internal error"},{7,"AstroPlanner, Unknown command"},{8,"AstroPlanner, Error in script"},
{9,"AstroPlanner, Cannot open script file"},{10,"AstroPlanner, Script not of general type"},{11,"AstroPlanner, Script is empty"},{12,"AstroPlanner, Script name illegal"}
};
public void Reset()
{
ErrorNo = 0;
}
public int ErrorNumber
{
get
{
return ErrorNo;
}
set
{
ErrorNo = value;
}
}
public string Message
{
get
{
return ErrorMapping[ErrorNo];
}
}
}
}