Refactored IEventListener and IEventSink to handle garbage data according to configur...
[lwes-dotnet/github-mirror.git] / Org.Lwes / Exceptions.cs
blob9a23374d688df31a2bbe973ea0e350c966e1b012
1 namespace Org.Lwes
3 using System;
4 using System.Runtime.Serialization;
6 /// <summary>
7 /// Exception indicating that an attribute was not set.
8 /// </summary>
9 [Serializable]
10 public class AttributeNotSetException : EventSystemException
12 #region Constructors
14 /// <summary>
15 /// Creates a new instance and initializes the error message.
16 /// </summary>
17 /// <param name="errorMessage">an error message</param>
18 public AttributeNotSetException(string errorMessage)
19 : base(errorMessage)
23 AttributeNotSetException(SerializationInfo info, StreamingContext context)
24 : base(info, context)
28 #endregion Constructors
31 /// <summary>
32 /// Exception thrown when bad data is encountered during serialization.
33 /// </summary>
34 [Serializable]
35 public class BadLwesDataException : EventSystemException
37 #region Constructors
39 /// <summary>
40 /// Creates a new instance.
41 /// </summary>
42 /// <param name="errorMessage">error message</param>
43 public BadLwesDataException(string errorMessage)
44 : base(errorMessage)
48 /// <summary>
49 /// Creates a new instance from serialization.
50 /// </summary>
51 /// <param name="info"></param>
52 /// <param name="context"></param>
53 public BadLwesDataException(SerializationInfo info, StreamingContext context)
54 : base(info, context)
58 #endregion Constructors
61 /// <summary>
62 /// Base class for exceptions thrown by the event system.
63 /// </summary>
64 [Serializable]
65 public class EventSystemException : Exception
67 #region Constructors
69 /// <summary>
70 /// Creates a new instance.
71 /// </summary>
72 /// <param name="errorMessage">error message</param>
73 public EventSystemException(string errorMessage)
74 : base(errorMessage)
78 /// <summary>
79 /// Creates a new instance.
80 /// </summary>
81 /// <param name="errorMessage">error message</param>
82 /// <param name="innerException">exception that caused this exception</param>
83 public EventSystemException(string errorMessage, Exception innerException)
84 : base(errorMessage, innerException)
88 /// <summary>
89 /// Creates a new instance from serialization.
90 /// </summary>
91 /// <param name="info"></param>
92 /// <param name="context"></param>
93 public EventSystemException(SerializationInfo info, StreamingContext context)
94 : base(info, context)
98 #endregion Constructors
101 /// <summary>
102 /// Exception thrown when an attriubte does not exist in an Event.
103 /// </summary>
104 [Serializable]
105 public class NoSuchAttributeException : EventSystemException
107 #region Constructors
109 /// <summary>
110 /// Creates a new instance.
111 /// </summary>
112 /// <param name="errorMessage">error message</param>
113 public NoSuchAttributeException(string errorMessage)
114 : base(errorMessage)
118 /// <summary>
119 /// Creates a new instance from serialization.
120 /// </summary>
121 /// <param name="info"></param>
122 /// <param name="context"></param>
123 public NoSuchAttributeException(SerializationInfo info, StreamingContext context)
124 : base(info, context)
128 #endregion Constructors
131 /// <summary>
132 /// Exception thrown when an attribute type does not exist.
133 /// </summary>
134 [Serializable]
135 public class NoSuchAttributeTypeException : EventSystemException
137 #region Constructors
139 /// <summary>
140 /// Creates a new instance.
141 /// </summary>
142 /// <param name="errorMessage">error message</param>
143 public NoSuchAttributeTypeException(string errorMessage)
144 : base(errorMessage)
148 /// <summary>
149 /// Creates a new instance from serialization.
150 /// </summary>
151 /// <param name="info"></param>
152 /// <param name="context"></param>
153 public NoSuchAttributeTypeException(SerializationInfo info, StreamingContext context)
154 : base(info, context)
158 #endregion Constructors