Skip to content

Commit

Permalink
Add error handling to gotConnected.
Browse files Browse the repository at this point in the history
  • Loading branch information
jech committed Oct 29, 2021
1 parent 8c21ede commit 06ee4cc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion static/galene.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

/**
Expand Down

0 comments on commit 06ee4cc

Please sign in to comment.