Try/catch around notification - failure should not abort processing!

This commit is contained in:
Simon Brooke 2020-02-25 21:53:05 +00:00
parent 80e5198b32
commit 3a34ba7adf
No known key found for this signature in database
GPG key ID: A7A4F18D1D4DF987
3 changed files with 31 additions and 2 deletions

View file

@ -266,7 +266,12 @@ var GeoCSV = {
*/
error( m) {
console.error( m);
document.getElementById( "error").innerText = m;
try {
document.getElementById( "error").innerText = m;
}
catch (anything) {
console.warn( "Error while trying to warn user: ", anything);
}
},
/**
@ -274,7 +279,12 @@ var GeoCSV = {
*/
message( m) {
console.log( m);
document.getElementById( "message").innerText = m;
try {
document.getElementById( "message").innerText = m;
}
catch (anything) {
console.warn( "Error while trying to notify user: ", anything);
}
}
},