decord/source/9774_isErrorWithCode.js

22 lines
565 B
JavaScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 9774
2026-07-27 11:26:19 +00:00
// Function ID: 75975
2026-07-20 16:05:17 +00:00
// Name: isErrorWithCode
// Dependencies: []
2026-07-25 08:10:48 +00:00
// Module 9774 (isErrorWithCode)
2026-07-23 10:11:24 +00:00
arg5.errorCodes = Object.freeze({ OPERATION_CANCELED: "OPERATION_CANCELED", IN_PROGRESS: "ASYNC_OP_IN_PROGRESS", UNABLE_TO_OPEN_FILE_TYPE: "UNABLE_TO_OPEN_FILE_TYPE" });
2026-07-20 16:05:17 +00:00
arg5.isErrorWithCode = function isErrorWithCode(arg0) {
let tmp = arg0 instanceof Error;
if (!tmp) {
let tmp2 = "object" === typeof arg0;
if (tmp2) {
tmp2 = null != arg0;
}
tmp = tmp2;
}
if (tmp) {
tmp = "code" in arg0;
}
return tmp;
};