From 3572a46939e9ad84a7ede2d789aa83411fcce488 Mon Sep 17 00:00:00 2001 From: Matthew Butler Date: Fri, 27 Apr 2012 16:13:47 -0300 Subject: [PATCH] Corrected onError callbacks to accept Exception --- Connection.dart | 5 +++-- DartMud.dart | 5 +++-- README | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Connection.dart b/Connection.dart index 4771644..755b02c 100644 --- a/Connection.dart +++ b/Connection.dart @@ -9,8 +9,9 @@ class Connection { Connection(this._sock) { _strInput = new StringInputStream(_sock.inputStream); - _sock.onError = () { - print("An error has occurred with Connection#$_sock"); + _sock.onError = (Exception e) { + print("An error has occurred with Connection#$_sock:"); + print(e); _sock.close(); }; } diff --git a/DartMud.dart b/DartMud.dart index b34223e..f802bbc 100644 --- a/DartMud.dart +++ b/DartMud.dart @@ -19,8 +19,9 @@ class ServerManager { } _listenSocket.onConnection = this._handleConn; - _listenSocket.onError = () { - print("Error occured with ServerSocket!"); + _listenSocket.onError = (Exception e) { + print("Error occured with ServerSocket!:"); + print(e); }; } diff --git a/README b/README index 7f28b56..079909a 100644 --- a/README +++ b/README @@ -18,7 +18,7 @@ To test out the mud: * In a console/terminal window, telnet to localhost port 5700 (eg: telnet localhost 5700) -Create a new account when loggin in (there are no default accounts provided). +Create a new account when logging in (there are no default accounts provided). Once logged in, use the 'help' command to see what commands are available to you.