-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy pathUPnPException.cs
46 lines (40 loc) · 1.16 KB
/
UPnPException.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
using System;
using System.Collections.Generic;
using System.Text;
namespace Waher.Networking.UPnP
{
/// <summary>
/// UPnP Exception
/// </summary>
public class UPnPException : Exception
{
private readonly string faultCode;
private readonly string faultString;
private readonly string upnpErrorCode;
private readonly string upnpErrorDescription;
internal UPnPException(string FaultCode, string FaultString, string UPnPErrorCode, string UPnPErrorDescription)
: base(string.IsNullOrEmpty(UPnPErrorDescription) ? FaultString : UPnPErrorDescription)
{
this.faultCode = FaultCode;
this.faultString = FaultString;
this.upnpErrorCode = UPnPErrorCode;
this.upnpErrorDescription = UPnPErrorDescription;
}
/// <summary>
/// SOAP Fault Code
/// </summary>
public string FaultCode => this.faultCode;
/// <summary>
/// SOAP Fault String
/// </summary>
public string FaultString => this.faultString;
/// <summary>
/// UPnP Error Code
/// </summary>
public string UPnPErrorCode => this.upnpErrorCode;
/// <summary>
/// UPnP Error Description
/// </summary>
public string UPnPErrorDescription => this.upnpErrorDescription;
}
}