Files
discord-decomp/_bundle/Module6403.js
T
2026-11-01 12:12:55 +02:00

27 lines
531 B
JavaScript

// Metro module 6403 (f6404).
import { isThenable } from "./isInstanceOf_6375";
export function handleCallbackErrors(a0, a1, r2 = () => {}) {
let r5;
try {
r5 = a0();
} catch (r9) {
a1(r9);
r2();
throw r9;
}
return (function maybeHandlePromiseRejection(a0, c25852_0, a2) {
if (isThenable(a0)) {
return a0.then((result) => {
a2();
return result;
}, (a0) => {
c25852_0(a0);
a2();
throw a0;
});
}
a2();
return a0;
})(r5, a1, r2);
}