From 9a8a018e65a930afe6e7f6850c5136e3b21f8f58 Mon Sep 17 00:00:00 2001 From: Frank Razenberg Date: Thu, 21 Aug 2014 09:26:47 +0200 Subject: [PATCH] Add <.NET 4 compatible constructor and xml doc entry to ErrorEventArgs --- websocket-sharp/ErrorEventArgs.cs | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/websocket-sharp/ErrorEventArgs.cs b/websocket-sharp/ErrorEventArgs.cs index 7ecbe795..d72fb295 100644 --- a/websocket-sharp/ErrorEventArgs.cs +++ b/websocket-sharp/ErrorEventArgs.cs @@ -49,16 +49,21 @@ namespace WebSocketSharp #region Internal Constructors - internal ErrorEventArgs (string message, Exception exc = null) + internal ErrorEventArgs (string message) + : this (message, null) + { + } + + internal ErrorEventArgs (string message, Exception exception) { _message = message; - _exception = exc; + _exception = exception; } #endregion #region Public Properties - + /// /// Gets the error message. /// @@ -71,14 +76,17 @@ namespace WebSocketSharp } } - /// - /// Gets the exception. - /// - public Exception Exception { + /// + /// Gets the exception that caused the error. + /// + /// A instance that represents the cause of the error, + /// or if the error isn't due to an exception. + /// + public Exception Exception { get { return _exception; } - } + } #endregion }