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