From d0a3a2b094f4057d8584e82deffb183a9b03b10d Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 4 Jul 2020 18:10:02 +0200 Subject: Show errors in web client as alert boxes. --- src/ws/proto.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ws/proto.js b/src/ws/proto.js index d21908e..e4834b0 100644 --- a/src/ws/proto.js +++ b/src/ws/proto.js @@ -105,6 +105,13 @@ try if(msgstr[c] != ' ' || instring == true) msg[idx] += msgstr[c]; } + if(msg[0] == "error") + { + alert("Error(#" + unescape(msg[1]) + "): " + unescape(msg[2])); + f++; + continue; + } + var subscribeid = msg[0]; var cmd = msg[1]; var id = msg[2]; -- cgit v1.2.3