Should this be taken literally as actual error text?
No, the error is always as shown below:
Uncaught Error: Radio not found!
at line 1 col 65
...ow Error("Radio not found!");this.setOpMode(0);this.mask(1,1...
Persusing the source will reveal what var objects are created as the module is fetched/parsed. Maybe a conditional test against 'undefined' or what might be expected as those are initialized, and/or throw your own user defined error to catch?
I don't quite understand what you are suggesting 🙂. Which properties could I test against undefined? I mean the error is happening inside the Espruino module, and apparently I'm unable to catch it externally. Modules are not my strongest side, but should't I be able to do that?--I mean, why throw an error if you are prevented from handling it 🤔..
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi Robin 🙂!
It's uploaded from the right-hand side, then uploaded to Flash using the "Send to Espruino" button in the IDE.
I have boiled down the code to this (right-hand side):
No, the error is always as shown below:
I don't quite understand what you are suggesting 🙂. Which properties could I test against
undefined
? I mean the error is happening inside the Espruino module, and apparently I'm unable to catch it externally. Modules are not my strongest side, but should't I be able to do that?--I mean, why throw an error if you are prevented from handling it 🤔..Thanks for taking the time to help 😁!