-
-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathBencodeException.cs
More file actions
46 lines (38 loc) · 1.14 KB
/
BencodeException.cs
File metadata and controls
46 lines (38 loc) · 1.14 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
using System;
#pragma warning disable 1591
namespace BencodeNET.Exceptions
{
/// <summary>
/// Represents generic errors in this bencode library.
/// </summary>
public class BencodeException : Exception
{
public BencodeException()
{ }
public BencodeException(string message)
: base(message)
{ }
public BencodeException(string message, Exception inner)
: base(message, inner)
{ }
}
/// <summary>
/// Represents generic errors in this bencode library related to a specific <see cref="Type"/>.
/// </summary>
/// <typeparam name="T">The related type.</typeparam>
public class BencodeException<T> : BencodeException
{
/// <summary>
/// The type related to this error. Usually the type being parsed.
/// </summary>
public Type RelatedType { get; } = typeof(T);
public BencodeException()
{ }
public BencodeException(string message)
: base(message)
{ }
public BencodeException(string message, Exception inner)
: base(message, inner)
{ }
}
}