H.uH -> H._unwrapNonDartException

This commit is contained in:
shenjack 2024-04-04 23:17:32 +08:00
parent 61a66327cf
commit 21fd0767b4
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -1042,33 +1042,33 @@ var A = {
if (a instanceof H.dt) return H.saveStackTrace(a, a.a) if (a instanceof H.dt) return H.saveStackTrace(a, a.a)
if (typeof a !== "object") return a if (typeof a !== "object") return a
if ("dartException" in a) return H.saveStackTrace(a, a.dartException) if ("dartException" in a) return H.saveStackTrace(a, a.dartException)
return H.uH(a) return H._unwrapNonDartException(a)
}, },
saveStackTrace(ex, err) { saveStackTrace(ex, err) {
if (t.u.b(err)) if (t.u.b(err))
if (err.$thrownJsError == null) err.$thrownJsError = ex if (err.$thrownJsError == null) err.$thrownJsError = ex
return err return err
}, },
uH(a) { _unwrapNonDartException(ex) {
var s, r, q, t1, o, n, m, l, k, j, i, h, g, f, e = null var s, r, q, t1, nsme, not_closure, null_call, l, k, j, i, h, g, match, e = null
if (!("message" in a)) return a if (!("message" in ex)) return ex
s = a.message s = ex.message
if ("number" in a && typeof a.number == "number") { if ("number" in ex && typeof ex.number == "number") {
r = a.number r = ex.number
q = r & 65535 q = r & 65535
if ((C.JsInt.am(r, 16) & 8191) === 10) switch (q) { if ((C.JsInt.am(r, 16) & 8191) === 10) switch (q) {
case 438: case 438:
return H.saveStackTrace(a, H.m9(H.as_string(s) + " (Error " + q + ")", e)) return H.saveStackTrace(ex, H.m9(H.as_string(s) + " (Error " + q + ")", e))
case 445: case 445:
case 5007: case 5007:
t1 = H.as_string(s) + " (Error " + q + ")" t1 = H.as_string(s) + " (Error " + q + ")"
return H.saveStackTrace(a, new H.NullError(t1, e)) return H.saveStackTrace(ex, new H.NullError(t1, e))
} }
} }
if (a instanceof TypeError) { if (ex instanceof TypeError) {
o = $.r7() nsme = $.r7()
n = $.r8() not_closure = $.r8()
m = $.r9() null_call = $.r9()
l = $.ra() l = $.ra()
k = $.rd() k = $.rd()
j = $.re() j = $.re()
@ -1076,30 +1076,30 @@ var A = {
$.rb() $.rb()
h = $.rg() h = $.rg()
g = $.rf() g = $.rf()
f = o.aH(s) match = nsme.aH(s)
if (f != null) return H.saveStackTrace(a, H.m9(s, f)) if (match != null) return H.saveStackTrace(ex, H.m9(s, match))
else { else {
f = n.aH(s) match = not_closure.aH(s)
if (f != null) { if (match != null) {
f.method = "call" match.method = "call"
return H.saveStackTrace(a, H.m9(s, f)) return H.saveStackTrace(ex, H.m9(s, match))
} else { } else {
f = m.aH(s) match = null_call.aH(s)
if (f == null) { if (match == null) {
f = l.aH(s) match = l.aH(s)
if (f == null) { if (match == null) {
f = k.aH(s) match = k.aH(s)
if (f == null) { if (match == null) {
f = j.aH(s) match = j.aH(s)
if (f == null) { if (match == null) {
f = i.aH(s) match = i.aH(s)
if (f == null) { if (match == null) {
f = l.aH(s) match = l.aH(s)
if (f == null) { if (match == null) {
f = h.aH(s) match = h.aH(s)
if (f == null) { if (match == null) {
f = g.aH(s) match = g.aH(s)
t1 = f != null t1 = match != null
} else t1 = true } else t1 = true
} else t1 = true } else t1 = true
} else t1 = true } else t1 = true
@ -1108,25 +1108,25 @@ var A = {
} else t1 = true } else t1 = true
} else t1 = true } else t1 = true
if (t1) { if (t1) {
return H.saveStackTrace(a, new H.NullError(s, f == null ? e : f.method)) return H.saveStackTrace(ex, new H.NullError(s, match == null ? e : match.method))
} }
} }
} }
return H.saveStackTrace(a, new H.hU(typeof s == "string" ? s : "")) return H.saveStackTrace(ex, new H.hU(typeof s == "string" ? s : ""))
} }
if (a instanceof RangeError) { if (ex instanceof RangeError) {
if (typeof s == "string" && s.indexOf("call stack") !== -1) return new P.el() if (typeof s == "string" && s.indexOf("call stack") !== -1) return new P.el()
s = function (b) { s = function (b) {
try { try {
return String(b) return String(b)
} catch (d) {} } catch (d) {}
return null return null
}(a) }(ex)
return H.saveStackTrace(a, new P.aS(false, e, e, typeof s == "string" ? s.replace(/^RangeError:\s*/, "") : s)) return H.saveStackTrace(ex, new P.aS(false, e, e, typeof s == "string" ? s.replace(/^RangeError:\s*/, "") : s))
} }
if (typeof InternalError == "function" && a instanceof InternalError) if (typeof InternalError == "function" && ex instanceof InternalError)
if (typeof s == "string" && s === "too much recursion") return new P.el() if (typeof s == "string" && s === "too much recursion") return new P.el()
return a return ex
}, },
get_trace_from_exception(a) { get_trace_from_exception(a) {
var s var s