X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=typescript_strings.py;fp=typescript_strings.py;h=89aa57a22b2d3f29bd68bbf45809f3ec2d5a3afe;hb=a16b1d711a5ff7d032760db43cda77add648fb69;hp=5d5eb814c79ac28e95381e42f3608a8571af60a5;hpb=f8f3544e5c1e8ed55b15b54cd0f3c85a7f2c3e14;p=ldk-java diff --git a/typescript_strings.py b/typescript_strings.py index 5d5eb814..89aa57a2 100644 --- a/typescript_strings.py +++ b/typescript_strings.py @@ -1638,7 +1638,14 @@ js_invoke = function(obj_ptr: number, fn_id: number, arg1: bigint|number, arg2: console.error("Got function call with id " + fn_id + " on incorrect JS object: " + obj); throw new Error("Got function call with id " + fn_id + " on incorrect JS object: " + obj); } - const ret = fn.value.bind(obj)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); + var ret; + try { + ret = fn.value.bind(obj)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); + } catch (e) { + console.error("Got an exception calling function with id " + fn_id + "! This is fatal."); + console.error(e); + throw e; + } if (ret === undefined || ret === null) return BigInt(0); return BigInt(ret); }""")