• Hi 👋,

    I'm getting this error from time to time when using the "SX127x" module in a couple of projects (custom HW, and ESP32).

    Uncaught Error: Radio not found!
     at line 1 col 65
    ...ow Error("Radio not found!");this.setOpMode(0);this.mask(1,1...
    

    I'm not so concerned with why it fails right now (probably bad SPI communication), but I'd like to catch it so I can handle it properly.

    I've tried the code below, but I still get Uncatched Error: ... in the WEB IDE.

        try {
            sx = require('SX127x').connect({
                spi: SPI1,
                cs: PIN_CS,
                rst: PIN_RESET
            });
        } catch (e) {
            console.log('Error catched: ', e);
        }
    

    Q: Can anyone advise me on how I can catch this error--or is there a more general way to catch errors that happen internally in the Espruino modules 🙂?

About

Avatar for rj @rj started