mirror of
https://github.com/status-im/react-native.git
synced 2025-01-09 17:15:54 +00:00
f42b5892a1
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
28 lines
769 B
C++
28 lines
769 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.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <cxxreact/ExceptionManager.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
/**
|
|
* Connector class (from C++ to ObjC++) to allow FabricUIManager to invoke native UI operations/updates.
|
|
* UIKit-related impl doesn't live here, but this class gets passed to the FabricUIManager C++ impl directly.
|
|
*/
|
|
class RCTCxxExceptionManager : public ExceptionManager {
|
|
public:
|
|
|
|
virtual void handleSoftException(const std::exception& e) const override;
|
|
virtual void handleFatalException(const std::exception& e) const override;
|
|
};
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|