mirror of
https://github.com/sbrl/Nibriboard.git
synced 2018-01-10 21:33:49 +00:00
[client] Show errors sent by the server in the console.
This commit is contained in:
parent
363fdbb20c
commit
ffd2b32abb
2 changed files with 6 additions and 1 deletions
|
@ -22,6 +22,7 @@ class RippleLink extends EventEmitter
|
|||
|
||||
// Respond to heartbeats from the server
|
||||
this.on("Heartbeat", this.handleHeartbeat.bind(this));
|
||||
this.on("Error", this.handleErrorMessage.bind(this));
|
||||
|
||||
// Close the socket correctly
|
||||
window.addEventListener("beforeunload", (function(event) {
|
||||
|
@ -49,6 +50,10 @@ class RippleLink extends EventEmitter
|
|||
this.emit(message.Event, message);
|
||||
}
|
||||
|
||||
handleErrorMessage(message) {
|
||||
console.error(message.Message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Replies to heartbeat messages from the server.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue