Open fatfatson opened 6 years ago
another suggestion:
why not put the raiseException
function in this module. it's too annoyed to import another one for just a test function.
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.
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 ... )
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.
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.