Skip to content

Commit

Permalink
add error instance to unhandled error perf metrics (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdmondChuiHW authored Jun 5, 2024
1 parent 94c8238 commit 3307f31
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions front_end/core/host/RNPerfMetrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class RNPerfMetrics {
params: {
type: 'error',
message: event.message,
error: event.error instanceof Error ? event.error : null,
}
});
}, {passive: true});
Expand All @@ -92,6 +93,7 @@ class RNPerfMetrics {
params: {
type: 'rejectedPromise',
message,
error: event.reason instanceof Error ? event.reason : null,
}
});
}, {passive: true});
Expand Down Expand Up @@ -206,6 +208,7 @@ export type UnhandledErrorEvent = Readonly<{
params: Readonly<{
type: 'error' | 'rejectedPromise',
message: string,
error: Error | null | undefined,
}>,
}>;

Expand Down

0 comments on commit 3307f31

Please sign in to comment.