/* Metro module 7362; source: utils/ErrorUtils.tsx; dependencies: [7363, 2] */ import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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}); (FileImportTrackerModule).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)]); } } global.__d(_fun59318, 7362, [7363, 2]) /* metro module 7362, dependencies: [7363, 2] */;