forked from canneverbe/Ketarin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ApplicationJobError.cs
43 lines (35 loc) · 1.07 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
using System;
namespace Ketarin
{
public class ApplicationJobError
{
#region Properties
public string RequestedUrl { get; set; }
internal ApplicationJob ApplicationJob { get; set; }
public Exception Error { get; set; }
public string Message
{
get
{
if (string.IsNullOrEmpty(this.RequestedUrl))
{
return this.Error.Message;
}
return this.Error.Message + " (" + this.RequestedUrl + ")";
}
}
#endregion
public ApplicationJobError(ApplicationJob job, Exception error)
{
this.RequestedUrl = string.Empty;
this.ApplicationJob = job;
this.Error = error;
}
public ApplicationJobError(ApplicationJob job, Exception error, string requestedUrl)
{
this.ApplicationJob = job;
this.Error = error;
this.RequestedUrl = requestedUrl;
}
}
}