BLUE
PHP 7.4.33
Path:
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/react-native/ReactCommon/jserrorhandler
Run
Logout
Edit File
Size: 2.16 KB
Close
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/react-native/ReactCommon/jserrorhandler/JsErrorHandler.h
Text
Base64
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * 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 <jsi/jsi.h> #include <iostream> #include <optional> namespace facebook::react { class JsErrorHandler { public: struct ProcessedError { struct StackFrame { std::optional<std::string> file; std::string methodName; std::optional<int> lineNumber; std::optional<int> column; friend std::ostream& operator<<( std::ostream& os, const StackFrame& frame); }; std::string message; std::optional<std::string> originalMessage; std::optional<std::string> name; std::optional<std::string> componentStack; std::vector<StackFrame> stack; int id; bool isFatal; jsi::Object extraData; friend std::ostream& operator<<( std::ostream& os, const ProcessedError& error); }; using OnJsError = std::function<void(jsi::Runtime& runtime, const ProcessedError& error)>; explicit JsErrorHandler(OnJsError onJsError); ~JsErrorHandler(); void handleError( jsi::Runtime& runtime, jsi::JSError& error, bool isFatal, bool logToConsole = true); bool hasHandledFatalError(); void registerErrorListener( const std::function<void(jsi::Runtime&, jsi::Value)>& listener); void setRuntimeReady(); bool isRuntimeReady(); void notifyOfFatalError(); bool inErrorHandler(); private: /** * This callback: * 1. Shouldn't retain the ReactInstance. So that we don't get retain cycles. * 2. Should be implemented by something that can outlive the react instance * (both before init and after teardown). So that errors during init and * teardown get reported properly. **/ OnJsError _onJsError; bool _hasHandledFatalError{}; bool _isRuntimeReady{}; std::shared_ptr<bool> _inErrorHandler; std::vector<std::function<void(jsi::Runtime&, jsi::Value)>> _errorListeners; void handleErrorWithCppPipeline( jsi::Runtime& runtime, jsi::JSError& error, bool isFatal, bool logToConsole); }; } // namespace facebook::react
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
tests
DIR
-
drwxr-xr-x
2025-03-28 11:04:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CMakeLists.txt
596 B
lrw-r--r--
2025-03-28 11:04:43
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
JsErrorHandler.cpp
13.33 KB
lrw-r--r--
2025-03-28 11:04:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
JsErrorHandler.h
2.16 KB
lrw-r--r--
2025-03-28 11:04:41
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
React-jserrorhandler.podspec
2.11 KB
lrw-r--r--
2025-03-28 11:04:43
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
StackTraceParser.cpp
9.84 KB
lrw-r--r--
2025-03-28 11:04:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
StackTraceParser.h
500 B
lrw-r--r--
2025-03-28 11:04:41
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).