Updated the README.txt to reflect recent changes.
[lwes-dotnet/github-mirror.git] / Org.Lwes / Exceptions.cs
blob424083c262946d0d0f735fa32646672e307e3c88
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 /// Base class for exceptions thrown by the event system.
33 /// </summary>
34 [Serializable]
35 public class EventSystemException : Exception
37 #region Constructors
39 /// <summary>
40 /// Creates a new instance.
41 /// </summary>
42 /// <param name="errorMessage">error message</param>
43 public EventSystemException(string errorMessage)
44 : base(errorMessage)
48 /// <summary>
49 /// Creates a new instance.
50 /// </summary>
51 /// <param name="errorMessage">error message</param>
52 /// <param name="innerException">exception that caused this exception</param>
53 public EventSystemException(string errorMessage, Exception innerException)
54 : base(errorMessage, innerException)
58 /// <summary>
59 /// Creates a new instance from serialization.
60 /// </summary>
61 /// <param name="info"></param>
62 /// <param name="context"></param>
63 public EventSystemException(SerializationInfo info, StreamingContext context)
64 : base(info, context)
68 #endregion Constructors
71 /// <summary>
72 /// Exception thrown when an attriubte does not exist in an Event.
73 /// </summary>
74 [Serializable]
75 public class NoSuchAttributeException : EventSystemException
77 #region Constructors
79 /// <summary>
80 /// Creates a new instance.
81 /// </summary>
82 /// <param name="errorMessage">error message</param>
83 public NoSuchAttributeException(string errorMessage)
84 : base(errorMessage)
88 /// <summary>
89 /// Creates a new instance from serialization.
90 /// </summary>
91 /// <param name="info"></param>
92 /// <param name="context"></param>
93 public NoSuchAttributeException(SerializationInfo info, StreamingContext context)
94 : base(info, context)
98 #endregion Constructors
101 /// <summary>
102 /// Exception thrown when an attribute type does not exist.
103 /// </summary>
104 [Serializable]
105 public class NoSuchAttributeTypeException : EventSystemException
107 #region Constructors
109 /// <summary>
110 /// Creates a new instance.
111 /// </summary>
112 /// <param name="errorMessage">error message</param>
113 public NoSuchAttributeTypeException(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 NoSuchAttributeTypeException(SerializationInfo info, StreamingContext context)
124 : base(info, context)
128 #endregion Constructors