Skip to content

Commit ed2fb2b

Browse files
Added always print error to console.
1 parent dab3ca0 commit ed2fb2b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

utils/globalErrorhandler.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { notifyError } from '@/services/notifier.service';
55
// JavaScript Error Handler
66
export const setupGlobalErrorHandlers = () => {
77
setJSExceptionHandler((error, isFatal) => {
8+
// Always print error to console for debugging
9+
console.error('Global JS Exception:', error, 'isFatal:', isFatal);
810
// Report the error using your actual reportError function
911
reportError(error, { isFatal });
1012

@@ -15,6 +17,8 @@ export const setupGlobalErrorHandlers = () => {
1517
// Native Exception Handler
1618
setNativeExceptionHandler(
1719
(exceptionString) => {
20+
// Always print native exception to console
21+
console.error('Global Native Exception:', exceptionString);
1822
// This is called when native code throws an exception
1923
const error = new Error(`Native Exception: ${exceptionString}`);
2024
reportError(error, { isFatal: true });

0 commit comments

Comments
 (0)