decord/source/utils/ErrorUtils.tsx
github-actions 7450227d0b chore: update source for alpha 345.4
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9596_m.js (380.6 MB)
2026-09-04 17:41:35 +00:00

46 lines
1.4 KiB
TypeScript

// Module ID: 13229
// Function ID: 13230
// Name: getUnderlyingIOSExceptionRecursively
// Dependencies: [13230, 2]
// Exports: getUnderlyingIOSError, serializeError
// Module 13229 (getUnderlyingIOSExceptionRecursively)
import set from "set" /* 2 */;
import BAGGAGE_HEADER_NAME from "BAGGAGE_HEADER_NAME" /* 13230 */;
function getUnderlyingIOSExceptionRecursively(NSUnderlyingError) {
if (null != NSUnderlyingError.userInfo.NSUnderlyingError) {
const tmp2 = getUnderlyingIOSExceptionRecursively(NSUnderlyingError.userInfo.NSUnderlyingError);
if (null != tmp2) {
return tmp2;
}
}
return NSUnderlyingError.userInfo.NSLocalizedDescription;
}
const result = set.fileFinishedImporting("utils/ErrorUtils.tsx");
export const getUnderlyingIOSError = function getUnderlyingIOSError(closure_8) {
try {
let tmp3 = getUnderlyingIOSExceptionRecursively(closure_8);
if (tmp3 == null) {
tmp3 = null;
}
return tmp3;
} catch (err) {
return null;
}
};
export const serializeError = function serializeError(arg0) {
error = arg0;
if (!Boolean(arg0)) {
const _Error = Error;
error = new Error("unknown error");
}
let error1 = error;
if (typeof error !== "object") {
const _Error2 = Error;
const _String = String;
error1 = new Error(String(error));
}
return JSON.stringify(BAGGAGE_HEADER_NAME.normalizeToSize(error1));
};