1 #region Copyright & License
2 //
3 // Copyright 2001-2005 The Apache Software Foundation
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 #endregion
18 
19 using System;
20 using System.Runtime.Serialization;
21 
22 namespace log4net.Core
23 {
24 	/// <summary>
25 	/// Exception base type for log4net.
26 	/// </summary>
27 	/// <remarks>
28 	/// <para>
29 	/// This type extends <see cref="ApplicationException"/>. It
30 	/// does not add any new functionality but does differentiate the
31 	/// type of exception being thrown.
32 	/// </para>
33 	/// </remarks>
34 	/// <author>Nicko Cadell</author>
35 	/// <author>Gert Driesen</author>
36 #if !NETCF
37 	[Serializable]
38 #endif
39 	public class LogException : ApplicationException
40 	{
41 		#region Public Instance Constructors
42 
43 		/// <summary>
44 		/// Constructor
45 		/// </summary>
46 		/// <remarks>
47 		/// <para>
48 		/// Initializes a new instance of the <see cref="LogException" /> class.
49 		/// </para>
50 		/// </remarks>
LogException()51 		public LogException()
52 		{
53 		}
54 
55 		/// <summary>
56 		/// Constructor
57 		/// </summary>
58 		/// <param name="message">A message to include with the exception.</param>
59 		/// <remarks>
60 		/// <para>
61 		/// Initializes a new instance of the <see cref="LogException" /> class with
62 		/// the specified message.
63 		/// </para>
64 		/// </remarks>
LogException(String message)65 		public LogException(String message) : base(message)
66 		{
67 		}
68 
69 		/// <summary>
70 		/// Constructor
71 		/// </summary>
72 		/// <param name="message">A message to include with the exception.</param>
73 		/// <param name="innerException">A nested exception to include.</param>
74 		/// <remarks>
75 		/// <para>
76 		/// Initializes a new instance of the <see cref="LogException" /> class
77 		/// with the specified message and inner exception.
78 		/// </para>
79 		/// </remarks>
LogException(String message, Exception innerException)80 		public LogException(String message, Exception innerException) : base(message, innerException)
81 		{
82 		}
83 
84 		#endregion Public Instance Constructors
85 
86 		#region Protected Instance Constructors
87 
88 #if !NETCF
89 		/// <summary>
90 		/// Serialization constructor
91 		/// </summary>
92 		/// <param name="info">The <see cref="SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
93 		/// <param name="context">The <see cref="StreamingContext" /> that contains contextual information about the source or destination.</param>
94 		/// <remarks>
95 		/// <para>
96 		/// Initializes a new instance of the <see cref="LogException" /> class
97 		/// with serialized data.
98 		/// </para>
99 		/// </remarks>
LogException(SerializationInfo info, StreamingContext context)100 		protected LogException(SerializationInfo info, StreamingContext context) : base(info, context)
101 		{
102 		}
103 #endif
104 
105 		#endregion Protected Instance Constructors
106 	}
107 }
108