From 06ee4cc30f3fcd1f01abfc368a542ddb439a1d72 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Fri, 29 Oct 2021 23:37:59 +0200 Subject: [PATCH] Add error handling to gotConnected. --- static/galene.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/static/galene.js b/static/galene.js index 03db18f..60e9445 100644 --- a/static/galene.js +++ b/static/galene.js @@ -324,7 +324,13 @@ function setConnected(connected) { function gotConnected() { setConnected(true); let up = getUserPass(); - this.join(group, up.username, up.password); + try { + this.join(group, up.username, up.password); + } catch(e) { + console.error(e); + displayError(e); + serverConnection.close(); + } } /**