Try/catch around notification - failure should not abort processing!
This commit is contained in:
parent
80e5198b32
commit
3a34ba7adf
3 changed files with 31 additions and 2 deletions
14
js/geocsv.js
14
js/geocsv.js
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue