-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBasicException.cs
More file actions
55 lines (47 loc) · 1.29 KB
/
BasicException.cs
File metadata and controls
55 lines (47 loc) · 1.29 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
50
51
52
53
54
55
namespace Algorithm.Interop.Exceptions
{
public class BasicException : Exception
{
/// <summary>
/// 异常描述
/// </summary>
public string? Description { get; protected set; }
/// <summary>
/// 是否可以被解决而不影响运行
/// </summary>
public bool CanHandle { get; set; }
/// <summary>
/// 异常严重性
/// </summary>
public ExceptionLevel Level { get; set; }
/// <summary>
/// 构造函数
/// </summary>
public BasicException()
{
}
/// <summary>
/// 构造函数
/// </summary>
/// <param name="message">消息</param>
public BasicException(string message) : base(message)
{
}
/// <summary>
/// 构造函数
/// </summary>
/// <param name="message">消息</param>
/// <param name="descr">描述</param>
public BasicException(string message, string descr) : base(message)
{
Description = descr;
}
/// <summary>
/// 异常级别
/// </summary>
public enum ExceptionLevel
{
Info = 0, Warning = 1, Error = 2, Fatal = 3, Disaster = 4
}
}
}