From d87e60c146ef8fe2c035b269513da09167e60eb0 Mon Sep 17 00:00:00 2001 From: sta Date: Sat, 22 Mar 2014 17:03:53 +0900 Subject: [PATCH] Refactored WebSocketException.cs --- websocket-sharp/WebSocketException.cs | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/websocket-sharp/WebSocketException.cs b/websocket-sharp/WebSocketException.cs index aebe5e59..682b7833 100644 --- a/websocket-sharp/WebSocketException.cs +++ b/websocket-sharp/WebSocketException.cs @@ -31,8 +31,7 @@ using System; namespace WebSocketSharp { /// - /// Represents the exception that occurred when attempting to perform an - /// operation on the WebSocket connection. + /// The exception that is thrown when a gets a fatal error. /// public class WebSocketException : Exception { @@ -43,13 +42,13 @@ namespace WebSocketSharp { } - internal WebSocketException (CloseStatusCode code) - : this (code, null, null) + internal WebSocketException (string reason) + : this (CloseStatusCode.Abnormal, reason, null) { } - internal WebSocketException (string reason) - : this (CloseStatusCode.Abnormal, reason, null) + internal WebSocketException (CloseStatusCode code) + : this (code, null, null) { } @@ -63,8 +62,7 @@ namespace WebSocketSharp { } - internal WebSocketException ( - CloseStatusCode code, string reason, Exception innerException) + internal WebSocketException (CloseStatusCode code, string reason, Exception innerException) : base (reason ?? code.GetMessage (), innerException) { Code = code; @@ -75,12 +73,11 @@ namespace WebSocketSharp #region Public Properties /// - /// Gets the associated with the - /// . + /// Gets the status code indicating the cause for the exception. /// /// - /// One of the values, indicates the cause of - /// the . + /// One of the enum values, represents the status code indicating + /// the cause for the exception. /// public CloseStatusCode Code { get; private set;