[Modify] Rethrow it

master
sta 9 years ago
parent 98a2b02dc3
commit 5dab7521e5

@ -956,7 +956,14 @@ namespace WebSocketSharp.Server
); );
} }
_listener.Start (); try {
_listener.Start ();
}
catch (Exception ex) {
var msg = "The underlying listener has failed to start.";
throw new InvalidOperationException (msg, ex);
}
_receiveThread = new Thread (new ThreadStart (receiveRequest)); _receiveThread = new Thread (new ThreadStart (receiveRequest));
_receiveThread.IsBackground = true; _receiveThread.IsBackground = true;
_receiveThread.Start (); _receiveThread.Start ();
@ -1310,9 +1317,12 @@ namespace WebSocketSharp.Server
/// <para> /// <para>
/// There is no certificate in the configuration. /// There is no certificate in the configuration.
/// </para> /// </para>
/// </exception> /// <para>
/// <exception cref="SocketException"> /// -or-
/// The underlying <see cref="TcpListener"/> has failed to start. /// </para>
/// <para>
/// The underlying <see cref="TcpListener"/> has failed to start.
/// </para>
/// </exception> /// </exception>
public void Start () public void Start ()
{ {

Loading…
Cancel
Save