diff --git a/Nibriboard/Client/NibriClient.cs b/Nibriboard/Client/NibriClient.cs index 95778e4..6962bc4 100644 --- a/Nibriboard/Client/NibriClient.cs +++ b/Nibriboard/Client/NibriClient.cs @@ -378,7 +378,7 @@ namespace Nibriboard.Client if(CurrentPlane == null) { Send(new ErrorMessage() { - Message = "Error: You can't complete a line until you've selected a plane" + + Message = "Error: You can't complete a line until you've selected a plane " + "to draw it on!" }); return; diff --git a/Nibriboard/ClientFiles/RippleLink.js b/Nibriboard/ClientFiles/RippleLink.js index 4f95924..e501516 100644 --- a/Nibriboard/ClientFiles/RippleLink.js +++ b/Nibriboard/ClientFiles/RippleLink.js @@ -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. */