decord/source/utils/ErrorUtils.tsx

47 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 7769
// Function ID: 7770
2026-07-20 16:05:17 +00:00
// Name: getUnderlyingIOSExceptionRecursively
2026-08-24 06:08:38 +00:00
// Dependencies: [7770, 2]
2026-07-20 16:05:17 +00:00
// Exports: getUnderlyingIOSError, serializeError
2026-08-24 06:08:38 +00:00
// Module 7769 (getUnderlyingIOSExceptionRecursively)
import set from "set" /* 2 */;
import BAGGAGE_HEADER_NAME from "BAGGAGE_HEADER_NAME" /* 7770 */;
2026-07-20 16:05:17 +00:00
function getUnderlyingIOSExceptionRecursively(NSUnderlyingError) {
if (null != NSUnderlyingError.userInfo.NSUnderlyingError) {
const tmp2 = getUnderlyingIOSExceptionRecursively(NSUnderlyingError.userInfo.NSUnderlyingError);
if (null != tmp2) {
return tmp2;
}
}
return NSUnderlyingError.userInfo.NSLocalizedDescription;
}
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("utils/ErrorUtils.tsx");
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
export const getUnderlyingIOSError = function getUnderlyingIOSError(closure_8) {
2026-07-29 08:29:29 +00:00
try {
2026-08-24 06:08:38 +00:00
let tmp3 = getUnderlyingIOSExceptionRecursively(closure_8);
2026-07-29 08:29:29 +00:00
if (tmp3 == null) {
tmp3 = null;
}
return tmp3;
} catch (err) {
return null;
2026-07-20 16:05:17 +00:00
}
};
export const serializeError = function serializeError(arg0) {
2026-08-24 06:08:38 +00:00
error = arg0;
2026-07-20 16:05:17 +00:00
if (!Boolean(arg0)) {
const _Error = Error;
error = new Error("unknown error");
}
let error1 = error;
2026-08-04 21:03:28 +00:00
if (typeof error !== "object") {
2026-07-20 16:05:17 +00:00
const _Error2 = Error;
const _String = String;
error1 = new Error(String(error));
}
2026-08-24 06:08:38 +00:00
return JSON.stringify(BAGGAGE_HEADER_NAME.normalizeToSize(error1));
2026-07-20 16:05:17 +00:00
};