react-native-exception-handler
react-native-exception-handler copied to clipboard
Error not captured: ReferenceError: variable is not defined
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
...
My code for the exceptions is pretty simple:
const jsExceptionHandler = (error, isFatal) => {
console.log("ExceptionsHandler", error, isFatal);
};
setJSExceptionHandler(jsExceptionHandler, true);