drained: handle errors from bootupdate
Such as:
```
Uncaught ReferenceError: "bleServiceOptions" is not defined
at line 4 col 228 in .boot0
...ECwA=="));bleServiceOptions.hid=Bangle.HID;
^
at line 68 col 50 in drained.app.js
eval(require('Storage').read('bootupdate.js'));
^
```
master
parent
73d41a40ff
commit
f8fc93301e
|
|
@ -103,7 +103,11 @@ const { disableBoot = false, restore = 20 }: DrainedSettings
|
||||||
// re-enable normal boot code when we're above a threshold:
|
// re-enable normal boot code when we're above a threshold:
|
||||||
function drainedRestore() { // "public", to allow users to call
|
function drainedRestore() { // "public", to allow users to call
|
||||||
if(disableBoot){
|
if(disableBoot){
|
||||||
eval(require('Storage').read('bootupdate.js'));
|
try{
|
||||||
|
eval(require('Storage').read('bootupdate.js'));
|
||||||
|
}catch(e){
|
||||||
|
console.log("error restoring bootupdate:" + e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
load(); // necessary after updating boot.0
|
load(); // necessary after updating boot.0
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue