-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHashException.cs
More file actions
55 lines (50 loc) · 1.36 KB
/
HashException.cs
File metadata and controls
55 lines (50 loc) · 1.36 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 HashException : BasicException
{
/// <summary>
/// 更新描述
/// </summary>
/// <param name="et">描述类型</param>
private void UpdateDescription(ErrorType et)
{
switch (et)
{
case ErrorType.UndefinedCompressLevel:
Description = "Undefined Compress Level, Hash Error";
break;
}
}
/// <summary>
/// 构造函数
/// </summary>
/// <param name="et">错误类型</param>
public HashException(ErrorType et)
{
UpdateDescription(et);
}
/// <summary>
/// 构造函数
/// </summary>
/// <param name="message">消息</param>
public HashException(string message) : base(message)
{
}
/// <summary>
/// 构造函数
/// </summary>
/// <param name="message">消息</param>
/// <param name="et">错误类型</param>
public HashException(string message, ErrorType et) : base(message)
{
UpdateDescription(et);
}
/// <summary>
/// 哈希错误类型
/// </summary>
public enum ErrorType
{
UndefinedCompressLevel = 0
}
}
}