mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
ca1c3f9080
Summary: This adds an option to the Error Reporting pipeline of React Native to attach custom extra data to Exceptions passed to the native ExceptionsManager. This allows for error logging abstractions such as Meta's FBLogger to attach extra fields to the reported error. This can help with more detailed error reports without having to stringify all data in the error message. Note: The field (which is technically on ExtendedError) is keyed using a Symbol. This is to make sure that any use of this ability is extremely deliberate, as (accidentally) adding tons of data (or unserializable data) can cause issues we send down the data to the native ExceptionsManager implementation. Data sent using this method should be strictly controlled, hence opting in is a concious effort using the symbol in ExceptionsManager Changelog: [Internal] [Added] - Ability to add custom data to extraData field of exceptions passed to the ExceptionsManager Reviewed By: yungsters Differential Revision: D36099191 fbshipit-source-id: ce3f0dae52acd742de98b71868323c5878eaa677