react-native-exception-handler
Version:
A react native module that lets you to register a global error handler that can capture fatal/non fatal uncaught exceptions.
13 lines (9 loc) • 475 B
TypeScript
export type JSExceptionHandler = (error: Error, isFatal: boolean) => void;
export type NativeExceptionHandler = (exceptionMsg: string) => void;
declare const getJSExceptionHandler: () => JSExceptionHandler;
declare const setJSExceptionHandler: (handler: JSExceptionHandler, allowInDevMode?: boolean) => void;
declare const setNativeExceptionHandler: (
handler: NativeExceptionHandler,
forceAppQuit?: boolean, // Android only
executeDefaultHandler?: boolean,
) => void;