Try/catch around notification - failure should not abort processing!
This commit is contained in:
parent
80e5198b32
commit
3a34ba7adf
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
img/map-pins/colours/*.png
|
img/map-pins/colours/*.png
|
||||||
img/map-pins/colours/*.svg
|
img/map-pins/colours/*.svg
|
||||||
|
node_modules
|
||||||
|
|
||||||
|
|
14
js/geocsv.js
14
js/geocsv.js
|
@ -266,7 +266,12 @@ var GeoCSV = {
|
||||||
*/
|
*/
|
||||||
error( m) {
|
error( m) {
|
||||||
console.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) {
|
message( m) {
|
||||||
console.log( 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
18
package-lock.json
generated
Normal file
18
package-lock.json
generated
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"name": "geocsv",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"leaflet": {
|
||||||
|
"version": "1.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.6.0.tgz",
|
||||||
|
"integrity": "sha512-CPkhyqWUKZKFJ6K8umN5/D2wrJ2+/8UIpXppY7QDnUZW5bZL5+SEI2J7GBpwh4LIupOKqbNSQXgqmrEJopHVNQ=="
|
||||||
|
},
|
||||||
|
"papaparse": {
|
||||||
|
"version": "5.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.1.1.tgz",
|
||||||
|
"integrity": "sha512-KPkW4GNQxunmYTeJIjHFrvilcNuHBWrfgbyvmagEmfGOA4hnP1WIkPbv4yABhj1Nam3as4w+7MBiI27BntwqVg=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue