aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ThirdParty/SmartThreadPool/Exceptions.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ThirdParty/SmartThreadPool/Exceptions.cs81
1 files changed, 81 insertions, 0 deletions
diff --git a/ThirdParty/SmartThreadPool/Exceptions.cs b/ThirdParty/SmartThreadPool/Exceptions.cs
new file mode 100644
index 0000000..c454709
--- /dev/null
+++ b/ThirdParty/SmartThreadPool/Exceptions.cs
@@ -0,0 +1,81 @@
1// Ami Bar
2// amibar@gmail.com
3
4using System;
5using System.Runtime.Serialization;
6
7namespace Amib.Threading
8{
9 #region Exceptions
10
11 /// <summary>
12 /// Represents an exception in case IWorkItemResult.GetResult has been canceled
13 /// </summary>
14 [Serializable]
15 public sealed class WorkItemCancelException : ApplicationException
16 {
17 public WorkItemCancelException() : base()
18 {
19 }
20
21 public WorkItemCancelException(string message) : base(message)
22 {
23 }
24
25 public WorkItemCancelException(string message, Exception e) : base(message, e)
26 {
27 }
28
29 public WorkItemCancelException(SerializationInfo si, StreamingContext sc) : base(si, sc)
30 {
31 }
32 }
33
34 /// <summary>
35 /// Represents an exception in case IWorkItemResult.GetResult has been timed out
36 /// </summary>
37 [Serializable]
38 public sealed class WorkItemTimeoutException : ApplicationException
39 {
40 public WorkItemTimeoutException() : base()
41 {
42 }
43
44 public WorkItemTimeoutException(string message) : base(message)
45 {
46 }
47
48 public WorkItemTimeoutException(string message, Exception e) : base(message, e)
49 {
50 }
51
52 public WorkItemTimeoutException(SerializationInfo si, StreamingContext sc) : base(si, sc)
53 {
54 }
55 }
56
57 /// <summary>
58 /// Represents an exception in case IWorkItemResult.GetResult has been timed out
59 /// </summary>
60 [Serializable]
61 public sealed class WorkItemResultException : ApplicationException
62 {
63 public WorkItemResultException() : base()
64 {
65 }
66
67 public WorkItemResultException(string message) : base(message)
68 {
69 }
70
71 public WorkItemResultException(string message, Exception e) : base(message, e)
72 {
73 }
74
75 public WorkItemResultException(SerializationInfo si, StreamingContext sc) : base(si, sc)
76 {
77 }
78 }
79
80 #endregion
81}