RCTErrorCustomizer.h 588 B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #import <Foundation/Foundation.h>
  8. @class RCTErrorInfo;
  9. /**
  10. * Provides an interface to customize React Native error messages and stack
  11. * traces from exceptions.
  12. */
  13. @protocol RCTErrorCustomizer <NSObject>
  14. /**
  15. * Customizes the given error, returning the passed info argument if no
  16. * customization is required.
  17. */
  18. - (nonnull RCTErrorInfo *)customizeErrorInfo:(nonnull RCTErrorInfo *)info;
  19. @end