Skip to content

Commit

Permalink
Corrected onError callbacks to accept Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
butlermatt committed Apr 27, 2012
1 parent 533fcd9 commit 3572a46
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Connection.dart
Expand Up @@ -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();
};
}
Expand Down
5 changes: 3 additions & 2 deletions DartMud.dart
Expand Up @@ -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);
};
}

Expand Down
2 changes: 1 addition & 1 deletion README
Expand Up @@ -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.

Expand Down

0 comments on commit 3572a46

Please sign in to comment.