2 // This file is part of the LWES .NET Binding (LWES.net)
4 // COPYRIGHT© 2009, Phillip Clark (phillip[at*flitbit[dot*org)
5 // original .NET implementation
7 // LWES.net is free software: you can redistribute it and/or modify
8 // it under the terms of the Lesser GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
12 // LWES.net is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // Lesser GNU General Public License for more details.
17 // You should have received a copy of the Lesser GNU General Public License
18 // along with LWES.net. If not, see <http://www.gnu.org/licenses/>.
23 using System
.Runtime
.Serialization
;
26 /// Exception indicating that an attribute was not set.
29 public class AttributeNotSetException
: EventSystemException
34 /// Creates a new instance and initializes the error message.
36 /// <param name="errorMessage">an error message</param>
37 public AttributeNotSetException(string errorMessage
)
42 AttributeNotSetException(SerializationInfo info
, StreamingContext context
)
47 #endregion Constructors
51 /// Exception thrown when bad data is encountered during serialization.
54 public class BadLwesDataException
: EventSystemException
59 /// Creates a new instance.
61 /// <param name="errorMessage">error message</param>
62 public BadLwesDataException(string errorMessage
)
68 /// Creates a new instance from serialization.
70 /// <param name="info"></param>
71 /// <param name="context"></param>
72 public BadLwesDataException(SerializationInfo info
, StreamingContext context
)
77 #endregion Constructors
81 /// Base class for exceptions thrown by the event system.
84 public class EventSystemException
: Exception
89 /// Creates a new instance.
91 /// <param name="errorMessage">error message</param>
92 public EventSystemException(string errorMessage
)
98 /// Creates a new instance.
100 /// <param name="errorMessage">error message</param>
101 /// <param name="innerException">exception that caused this exception</param>
102 public EventSystemException(string errorMessage
, Exception innerException
)
103 : base(errorMessage
, innerException
)
108 /// Creates a new instance from serialization.
110 /// <param name="info"></param>
111 /// <param name="context"></param>
112 public EventSystemException(SerializationInfo info
, StreamingContext context
)
113 : base(info
, context
)
117 #endregion Constructors
121 /// Exception thrown when an attriubte does not exist in an Event.
124 public class NoSuchAttributeException
: EventSystemException
129 /// Creates a new instance.
131 /// <param name="errorMessage">error message</param>
132 public NoSuchAttributeException(string errorMessage
)
138 /// Creates a new instance from serialization.
140 /// <param name="info"></param>
141 /// <param name="context"></param>
142 public NoSuchAttributeException(SerializationInfo info
, StreamingContext context
)
143 : base(info
, context
)
147 #endregion Constructors
151 /// Exception thrown when an attribute type does not exist.
154 public class NoSuchAttributeTypeException
: EventSystemException
159 /// Creates a new instance.
161 /// <param name="errorMessage">error message</param>
162 public NoSuchAttributeTypeException(string errorMessage
)
168 /// Creates a new instance from serialization.
170 /// <param name="info"></param>
171 /// <param name="context"></param>
172 public NoSuchAttributeTypeException(SerializationInfo info
, StreamingContext context
)
173 : base(info
, context
)
177 #endregion Constructors