20 lines
716 B
JavaScript
20 lines
716 B
JavaScript
// Metro module 289 (f290).
|
|
import reportException, { SyntheticError } from "./reportException";
|
|
const getExtendedError = function getExtendedError(a0, a1) {
|
|
const r9 = a0 instanceof Error ? a0 : typeof a0 === "string" ? new SyntheticError(a0) : new SyntheticError("Unspecified error");
|
|
try {
|
|
r9.componentStack = a1.componentStack;
|
|
r9.isComponentError = true;
|
|
} catch ($e) {}
|
|
return r9;
|
|
};
|
|
export function onUncaughtError(a0, a1) {
|
|
reportException.handleException(getExtendedError(a0, a1), true);
|
|
}
|
|
export function onCaughtError(a0, a1) {
|
|
reportException.handleException(getExtendedError(a0, a1), false);
|
|
}
|
|
export function onRecoverableError(a0, a1) {
|
|
console.warn(getExtendedError(a0, a1));
|
|
}
|