react-native-exception-handler icon indicating copy to clipboard operation
react-native-exception-handler copied to clipboard

Error not captured: ReferenceError: variable is not defined

Open axlalvaro opened this issue 3 years ago • 0 comments
trafficstars

The library is catching the JS errors, but particularly "ReferenceError: variable is not defined" doesn't seem to capture it.

I forced this error by misspelling a variable name and I get this in the console:

<DoorCard
    ref={(ref) => this.doorsRefs = {...this.doorsRefs, [`door-${item.id}`]: ref}}
    door={itemm} // instead of item
    ...
Captura de pantalla 2022-02-10 a las 14 23 25

My code for the exceptions is pretty simple:

const jsExceptionHandler = (error, isFatal) => {
        console.log("ExceptionsHandler", error, isFatal);
};
setJSExceptionHandler(jsExceptionHandler, true);

axlalvaro avatar Feb 10 '22 13:02 axlalvaro