forked from Bukimedia/PrestaSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PrestaSharpException.cs
37 lines (32 loc) · 1.32 KB
/
PrestaSharpException.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace Bukimedia.PrestaSharp
{
public class PrestaSharpException : ApplicationException
{
public HttpStatusCode ResponseHttpStatusCode { get; set; }
public string ResponseContent { get; set; }
public string ResponseErrorMessage { get; set; }
public PrestaSharpException()
: base()
{
}
public PrestaSharpException(string ResponseContent, string ResponseErrorMessage, Exception ResponseErrorException)
: base(ResponseContent + " " + ResponseErrorMessage, ResponseErrorException)
{
this.ResponseContent = ResponseContent;
this.ResponseErrorMessage = ResponseErrorMessage;
}
public PrestaSharpException(string ResponseContent, string ResponseErrorMessage, HttpStatusCode ResponseHttpStatusCode, Exception ResponseErrorException)
: base(ResponseContent + " " + ResponseErrorMessage + " HttpStatusCode: " + ResponseHttpStatusCode, ResponseErrorException)
{
this.ResponseContent = ResponseContent;
this.ResponseErrorMessage = ResponseErrorMessage;
this.ResponseHttpStatusCode = ResponseHttpStatusCode;
}
}
}