decord/source/7593_errorCallback.js
2026-08-25 06:04:03 +00:00

42 lines
1.4 KiB
JavaScript

// Module ID: 7593
// Function ID: 7594
// Name: errorCallback
// Dependencies: [7594, 7601, 7602, 7625, 7597, 7614]
// Module 7593 (errorCallback)
import instrumentError from "instrumentError" /* 7594 */;
import instrumentUnhandledRejection from "instrumentUnhandledRejection" /* 7601 */;
import spanTimeInputToSeconds from "spanTimeInputToSeconds" /* 7602 */;
require = arg1;
const dependencyMap = arg6;
function errorCallback() {
let obj = spanTimeInputToSeconds;
const activeSpan = obj.getActiveSpan();
let rootSpan = activeSpan;
if (activeSpan) {
rootSpan = tmp(7602).getRootSpan(activeSpan);
const tmpResult = tmp(7602);
}
if (rootSpan) {
if (tmp(7625).DEBUG_BUILD) {
const logger = tmp(7597).logger;
const _HermesInternal = HermesInternal;
logger.log("[Tracing] Root span: " + "internal_error" + " -> Global error occurred");
}
obj = { code: null, message: "internal_error" };
obj[0] = tmp(7614).SPAN_STATUS_ERROR;
rootSpan.setStatus(obj);
}
}
let c2 = false;
errorCallback.tag = "sentry_tracingErrorCallback";
arg5.registerSpanErrorInstrumentation = function registerSpanErrorInstrumentation() {
if (!c2) {
c2 = true;
const result = instrumentError.addGlobalErrorInstrumentationHandler(errorCallback);
const obj = instrumentError;
const result1 = instrumentUnhandledRejection.addGlobalUnhandledRejectionInstrumentationHandler(errorCallback);
const obj2 = instrumentUnhandledRejection;
}
};