decord/source/13847_objectifyError.js

136 lines
4.7 KiB
JavaScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 13847
// Function ID: 13848
2026-07-29 08:29:29 +00:00
// Name: objectifyError
2026-08-24 06:08:38 +00:00
// Dependencies: [473, 13848, 190, 998]
2026-07-29 08:29:29 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 13847 (objectifyError)
import install from "install" /* 473 */;
2026-07-29 08:29:29 +00:00
if (!install) {
let obj = { default: null };
obj[0] = install;
let tmp3 = obj;
} else {
tmp3 = install;
}
2026-08-24 06:08:38 +00:00
install = tmp3.default;
2026-07-29 08:29:29 +00:00
let closure_5 = { veto: null };
function objectifyError(headers) {
2026-08-24 06:08:38 +00:00
closure_0 = headers;
2026-07-29 08:29:29 +00:00
const obj = {};
const ownPropertyNames = Object.getOwnPropertyNames(headers);
const item = ownPropertyNames.forEach((arg0) => {
obj[arg0] = headers[arg0];
});
return obj;
}
export default (arg0) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
2026-07-29 08:29:29 +00:00
return (arg0) => {
function reportError(stack) {
const logger = stack;
try {
2026-08-24 06:08:38 +00:00
if (_default) {
if (_default2) {
if (_default) {
if (_default2) {
2026-08-04 21:03:28 +00:00
if (typeof tmp16 !== "function") {
2026-07-29 08:29:29 +00:00
logger.error("parseErrorStack is not a function", []);
let obj = { parseErrorStackType: null, parseErrorStack: null };
2026-08-24 06:08:38 +00:00
obj[0] = typeof _default;
obj[1] = _default;
2026-07-29 08:29:29 +00:00
logger.debug(obj);
2026-08-04 21:03:28 +00:00
} else if (typeof tmp18 !== "function") {
2026-07-29 08:29:29 +00:00
logger.error("symbolicateStackTrace is not a function", []);
obj = { symbolicateStackTraceType: null, symbolicateStackTrace: null };
2026-08-24 06:08:38 +00:00
obj[0] = typeof _default2;
obj[1] = _default2;
2026-07-29 08:29:29 +00:00
logger.debug(obj);
} else {
try {
2026-08-24 06:08:38 +00:00
const promise = _default2(_default(stack.stack));
_default2(_default(stack.stack)).then((stack) => {
2026-07-29 08:29:29 +00:00
stack = stack.stack;
const mapped = stack.map((file) => ({ fileName: file.file, functionName: file.methodName, lineNumber: file.lineNumber }));
let found = mapped;
2026-08-24 06:08:38 +00:00
if (closure_1_1.veto) {
2026-07-29 08:29:29 +00:00
found = mapped.filter((arg0) => {
let vetoResult;
if (closure_1 != null) {
vetoResult = closure_1.veto(arg0);
}
return vetoResult;
});
}
stack.error(stack.message, found);
}).catch((headers) => {
stack.error("Unable to symbolicate stack trace from error object", []);
2026-08-24 06:08:38 +00:00
if (typeof closure_1_6 !== "function") {
2026-07-29 08:29:29 +00:00
HermesBuiltin.throwTypeError();
}
stack = headers;
const obj = {};
const ownPropertyNames = Object.getOwnPropertyNames(headers);
const item = ownPropertyNames.forEach((arg0) => {
obj[arg0] = headers[arg0];
});
stack.debug(obj);
});
} catch (tmp32) {
logger.error("Unable to parse stack trace from error object", []);
2026-08-24 06:08:38 +00:00
logger.debug(closure_1_6(tmp32));
2026-07-29 08:29:29 +00:00
}
}
}
}
logger.error("parseErrorStack or symbolicateStackTrace is not available", []);
obj = { parseErrorStackAvailable: null, symbolicateStackTraceAvailable: null };
2026-08-24 06:08:38 +00:00
obj[0] = _default;
obj[1] = _default2;
2026-07-29 08:29:29 +00:00
logger.debug(obj);
} else {
const tmp12 = logger(998);
2026-08-04 21:03:28 +00:00
if (typeof tmp12 === "function") {
2026-08-24 06:08:38 +00:00
_default2 = tmp12;
2026-07-29 08:29:29 +00:00
} else {
_default2 = tmp13.default;
}
}
} else {
const tmp5 = logger(190);
2026-08-04 21:03:28 +00:00
if (typeof tmp5 === "function") {
2026-08-24 06:08:38 +00:00
_default = tmp5;
2026-07-29 08:29:29 +00:00
} else {
_default = tmp6.default;
}
}
} catch (tmp47) {
logger.error("Unable to load \"react-native/Libraries/Core/Devtools/parseErrorStack\" or \"react-native/Libraries/Core/Devtools/symbolicateStackTrace\"", []);
2026-08-24 06:08:38 +00:00
logger.debug(closure_1_6(tmp47));
2026-07-29 08:29:29 +00:00
}
}
2026-08-24 06:08:38 +00:00
const result = callback(closure_1_1[1]).assertHasLoggerPlugin(arg0);
2026-07-29 08:29:29 +00:00
callback = arg0;
let obj = callback;
if (!callback) {
obj = {};
}
2026-08-24 06:08:38 +00:00
closure_1 = Object.assign({}, closure_1_5, obj);
2026-07-29 08:29:29 +00:00
obj = {
onConnect() {
2026-08-24 06:08:38 +00:00
const proxy = new Proxy(closure_1_4.addException, {
2026-07-29 08:29:29 +00:00
apply(apply) {
callback(arg2[0]);
return apply.apply(arg1, arg2);
}
});
2026-08-24 06:08:38 +00:00
closure_1_4.addException = proxy;
2026-07-29 08:29:29 +00:00
},
features: { reportError }
};
return obj;
};
};