Throws exception instead of returning null

This commit is contained in:
Nicolas Le Goff
2014-02-28 11:21:52 +01:00
parent 0299250097
commit 5df7c37bf0
2 changed files with 21 additions and 14 deletions

View File

@@ -22,7 +22,7 @@ define([
},
close: function() {
if (false === this.isConnected()) {
return;
throw "Not connected to websocket";
}
activeSession.close();
activeSession = null;