[Modify] Throw exceptions
This commit is contained in:
parent
657dd7d732
commit
eda5f38d0b
@ -399,8 +399,13 @@ namespace WebSocketSharp.Server
|
||||
/// </param>
|
||||
protected void Error (string message, Exception exception)
|
||||
{
|
||||
if (message != null && message.Length > 0)
|
||||
OnError (new ErrorEventArgs (message, exception));
|
||||
if (message == null)
|
||||
throw new ArgumentNullException ("message");
|
||||
|
||||
if (message.Length == 0)
|
||||
throw new ArgumentException ("An empty string.", "message");
|
||||
|
||||
OnError (new ErrorEventArgs (message, exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user