forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add spec for ExceptionsManager (facebook#24900)
Summary: Part of facebook#24875, adds a spec for ExceptionsManager ## Changelog [General] [Added] - TM Add spec for ExceptionsManager Pull Request resolved: facebook#24900 Reviewed By: fkgozali Differential Revision: D15434006 Pulled By: RSNara fbshipit-source-id: 1a505744a84c0c4ac3a9fac6c91a391fbd8a9f46
- Loading branch information
Showing
9 changed files
with
66 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @flow strict-local | ||
* @format | ||
*/ | ||
|
||
'use strict'; | ||
|
||
import type {TurboModule} from 'RCTExport'; | ||
import * as TurboModuleRegistry from 'TurboModuleRegistry'; | ||
|
||
export type StackFrame = {| | ||
column: ?number, | ||
file: string, | ||
lineNumber: number, | ||
methodName: string, | ||
|}; | ||
|
||
export interface Spec extends TurboModule { | ||
+reportFatalException: ( | ||
message: string, | ||
stack: Array<StackFrame>, | ||
exceptionId: number, | ||
) => void; | ||
+reportSoftException: ( | ||
message: string, | ||
stack: Array<StackFrame>, | ||
exceptionId: number, | ||
) => void; | ||
+updateExceptionMessage: ( | ||
message: string, | ||
stack: Array<StackFrame>, | ||
exceptionId: number, | ||
) => void; | ||
// Android only | ||
+dismissRedbox: () => void; | ||
} | ||
|
||
export default TurboModuleRegistry.getEnforcing<Spec>('ExceptionsManager'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters