mirror of
https://github.com/status-im/react-native.git
synced 2025-02-11 17:07:09 +00:00
Summary: It is sometimes useful to report soft/fatal errors from C++ (native) to the same RCTExceptionsManager that is already handling JS exceptions. `ICxxExceptionManager` is an approach to provide such access, which impl provided for ObjC++. Reviewed By: shergin Differential Revision: D7224944 fbshipit-source-id: 8c607226b67851d46f4c787f5b6e6c8cb6a1afea
25 lines
595 B
C++
25 lines
595 B
C++
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#include <exception>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
/**
|
|
* An abstract class for C++-based exception handling that differentiates
|
|
* soft exceptions from fatal exceptions.
|
|
*/
|
|
class ExceptionManager {
|
|
public:
|
|
virtual void handleSoftException(const std::exception &e) const = 0;
|
|
virtual void handleFatalException(const std::exception &e) const = 0;
|
|
};
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|