forked from GitSullied/Ketarin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ApplicationJobError.cs
60 lines (51 loc) · 1.4 KB
/
ApplicationJobError.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
using System;
using System.Collections.Generic;
using System.Text;
namespace Ketarin
{
public class ApplicationJobError
{
private ApplicationJob m_ApplicationJob;
private Exception m_Error;
private string m_RequestedUrl = string.Empty;
#region Properties
public string RequestedUrl
{
get { return m_RequestedUrl; }
set { m_RequestedUrl = value; }
}
internal ApplicationJob ApplicationJob
{
get { return m_ApplicationJob; }
set { m_ApplicationJob = value; }
}
public Exception Error
{
get { return m_Error; }
set { m_Error = value; }
}
public string Message
{
get
{
if (string.IsNullOrEmpty(m_RequestedUrl))
{
return m_Error.Message;
}
return m_Error.Message + " (" + m_RequestedUrl + ")";
}
}
#endregion
public ApplicationJobError(ApplicationJob job, Exception error)
{
m_ApplicationJob = job;
m_Error = error;
}
public ApplicationJobError(ApplicationJob job, Exception error, string requestedUrl)
{
m_ApplicationJob = job;
m_Error = error;
m_RequestedUrl = requestedUrl;
}
}
}