mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 12:05:06 +00:00
add getter as public api for ErrorUtils._globalHandler
Summary:As discussed here #1194 . This add an getter the default handler, so that custom handler can be added (monkey patch?) without overwriting the default handler Closes https://github.com/facebook/react-native/pull/5575 Differential Revision: D2948994 fb-gh-sync-id: 2b6d1619cfe68f78b326c6d232b9bf57c489c45d shipit-source-id: 2b6d1619cfe68f78b326c6d232b9bf57c489c45d
This commit is contained in:
parent
62ac6aeb40
commit
e0a0cac280
@ -20,6 +20,9 @@ var ErrorUtils = {
|
||||
setGlobalHandler: function(fun) {
|
||||
ErrorUtils._globalHandler = fun;
|
||||
},
|
||||
getGlobalHandler: function() {
|
||||
return ErrorUtils._globalHandler;
|
||||
},
|
||||
reportError: function(error) {
|
||||
ErrorUtils._globalHandler && ErrorUtils._globalHandler(error);
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user