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

smallbug: the callStack is lost in the exception.userInfo

Open fatfatson opened this issue 7 years ago • 4 comments
trafficstars

https://github.com/master-atul/react-native-exception-handler/blob/f9175d2fd67c82c32bd2bca3a4e5cf3aa2ed8947/ios/ReactNativeExceptionHandler.m#L202

here the userInfo param should be the one above instead of a new created one.

fatfatson avatar Jun 20 '18 10:06 fatfatson

another suggestion: why not put the raiseException function in this module. it's too annoyed to import another one for just a test function.

fatfatson avatar Jun 20 '18 10:06 fatfatson

For the userInfo loss. @fatfatson Can you raise a PR for the same ? raiseException is not meant to be used in a live project. Hence it will not be part of this module.

a7ul avatar Jun 20 '18 11:06 a7ul

I have make a PR for bugfix. I still think putting the raiseExecption function here is convenient for all of us, the overload is trivial and much less than importing another module( manage, install, link ... )

fatfatson avatar Jun 21 '18 01:06 fatfatson

Hi @fatfatson Thank you for the PR. It looks good to me. But I don't believe that raise test native exception should be part of this module. The main reason being, it should never be in the production code. Hence, the decision to keep it as a separate module. By keeping it separate, we can quite easily remove it from the main react native code after testing the handler.

a7ul avatar Jun 21 '18 05:06 a7ul