-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathErrorInfo.cs
More file actions
49 lines (43 loc) · 1.46 KB
/
ErrorInfo.cs
File metadata and controls
49 lines (43 loc) · 1.46 KB
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
namespace ScriptedEvents.Structures
{
using ScriptedEvents.API.Enums;
/// <summary>
/// Holds information about an SE error.
/// </summary>
public readonly struct ErrorInfo
{
/// <summary>
/// Initializes a new instance of the <see cref="ErrorInfo"/> struct.
/// </summary>
/// <param name="id">The error ID.</param>
/// <param name="code">The error code.</param>
/// <param name="info">Short description.</param>
/// <param name="longInfo">Long description.</param>
public ErrorInfo(int id, ErrorCode code, string info, string longInfo)
{
Id = id;
Code = code;
Info = info;
LongDescription = longInfo;
}
/// <summary>
/// Gets the error ID.
/// </summary>
public int Id { get; }
/// <summary>
/// Gets the error code.
/// </summary>
public ErrorCode Code { get; }
/// <summary>
/// Gets the short description of the error.
/// </summary>
public string Info { get; }
/// <summary>
/// Gets the long description of the error.
/// </summary>
public string LongDescription { get; }
/// <inheritdoc/>
public override string ToString()
=> $"{Info} [Error Code: SE-{Id}] [Run 'shelp SE-{Id}' in server console for more details]";
}
}