You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by ni...@apache.org on 2004/06/07 03:06:07 UTC

cvs commit: logging-log4net/src/Core LoggingEvent.cs

nicko       2004/06/06 18:06:07

  Modified:    src/Core LoggingEvent.cs
  Log:
  Added ExceptionObject property to get the exception object if it exists
  
  Revision  Changes    Path
  1.6       +32 -0     logging-log4net/src/Core/LoggingEvent.cs
  
  Index: LoggingEvent.cs
  ===================================================================
  RCS file: /home/cvs/logging-log4net/src/Core/LoggingEvent.cs,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LoggingEvent.cs	30 May 2004 11:07:32 -0000	1.5
  +++ LoggingEvent.cs	7 Jun 2004 01:06:07 -0000	1.6
  @@ -473,20 +473,52 @@
   		/// The message object used to initialize this event.
   		/// </value>
   		/// <remarks>
  +		/// <para>
   		/// Gets the message object used to initialize this event.
   		/// Note that this event may not have a valid message object.
   		/// If the event is serialized the message object will not 
   		/// be transferred. To get the text of the message the
   		/// <see cref="RenderedMessage"/> property must be used 
   		/// not this property.
  +		/// </para>
  +		/// <para>
   		/// If there is no defined message object for this event then
   		/// null will be returned.
  +		/// </para>
   		/// </remarks>
   		public object MessageObject
   		{
   			get 
   			{ 
   				return m_message;
  +			}
  +		} 
  +
  +		/// <summary>
  +		/// Gets the exception object used to initialize this event.
  +		/// </summary>
  +		/// <value>
  +		/// The exception object used to initialize this event.
  +		/// </value>
  +		/// <remarks>
  +		/// <para>
  +		/// Gets the exception object used to initialize this event.
  +		/// Note that this event may not have a valid exception object.
  +		/// If the event is serialized the exception object will not 
  +		/// be transferred. To get the text of the exception the
  +		/// <see cref="GetExceptionString"/> method must be used 
  +		/// not this property.
  +		/// </para>
  +		/// <para>
  +		/// If there is no defined exception object for this event then
  +		/// null will be returned.
  +		/// </para>
  +		/// </remarks>
  +		public Exception ExceptionObject
  +		{
  +			get 
  +			{ 
  +				return m_thrownException;
   			}
   		}