57 lines
2.7 KiB
TypeScript
57 lines
2.7 KiB
TypeScript
/* Metro module 7362; source: utils/ErrorUtils.tsx; dependencies: [7363, 2] */
|
|
function _fun59318(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7540:6, offset: 0x016e5989, size: 116 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ErrorUtils.tsx');
|
|
exports.getUnderlyingIOSError = getUnderlyingIOSError;
|
|
exports.serializeError = serializeError;
|
|
}
|
|
|
|
function getUnderlyingIOSExceptionRecursively(a0) { // fn#59319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7540:44, offset: 0x016e59fd, size: 69 bytes, params: 2, frame: 13
|
|
let userInfo = a0.userInfo;
|
|
let NSUnderlyingError = userInfo.NSUnderlyingError;
|
|
if (NSUnderlyingError == null) {
|
|
return a0.userInfo.NSLocalizedDescription;
|
|
}
|
|
const getUnderlyingIOSExceptionRecursivelyBinding = getUnderlyingIOSExceptionRecursively;
|
|
userInfo = a0.userInfo;
|
|
NSUnderlyingError = userInfo.NSUnderlyingError;
|
|
const underlyingIOSExceptionRecursivelyBinding = getUnderlyingIOSExceptionRecursivelyBinding(NSUnderlyingError);
|
|
if (underlyingIOSExceptionRecursivelyBinding != null) {
|
|
return underlyingIOSExceptionRecursivelyBinding;
|
|
}
|
|
userInfo = a0.userInfo;
|
|
return userInfo.NSLocalizedDescription;
|
|
}
|
|
|
|
function getUnderlyingIOSError(a0) { // fn#59320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7540:395, offset: 0x016e5a42, size: 42 bytes, params: 2, frame: 12
|
|
var r0;
|
|
var value;
|
|
var value2;
|
|
var value3;
|
|
var error;
|
|
try {
|
|
value = environment;
|
|
value = getUnderlyingIOSExceptionRecursively(a0);
|
|
value2 = null;
|
|
value3 = value2 != value;
|
|
r0 = value3 ? value : value2;
|
|
} catch (error) {
|
|
return null;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function serializeError(a0) { // fn#59321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7540:544, offset: 0x016e5a6c, size: 156 bytes, params: 2, frame: 15
|
|
let value = a0;
|
|
const Boolean = global.Boolean;
|
|
const r2 = Boolean(value) ? value : new global.Error('unknown error');
|
|
const r4 = typeof r2 === 'object' ? r2 : new global.Error(global.String(r2));
|
|
const JSON = global.JSON;
|
|
const stringify = JSON.stringify;
|
|
value = require(7363) /* metro dependency 7363 */;
|
|
return Reflect.apply(stringify, JSON, [value.normalizeToSize(r4)]);
|
|
}
|
|
|