X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=java_strings.py;h=f97ca9b7d0cff3ac4b416f175c8add0d10c9d040;hb=17731f152e9d722247c54fd81111ce49ab5b7a27;hp=7f82567ef408adbb16ab25c58bb0ac857d026cc7;hpb=a40eeed94e15dde00b73fa70c459e630ea679bf1;p=ldk-java diff --git a/java_strings.py b/java_strings.py index 7f82567e..f97ca9b7 100644 --- a/java_strings.py +++ b/java_strings.py @@ -854,6 +854,12 @@ import java.util.Arrays; else: out_c = out_c + ", " + arg_info.arg_name out_c = out_c + ");\n" + + out_c += "\tif ((*env)->ExceptionCheck(env)) {\n" + out_c += "\t\t(*env)->ExceptionDescribe(env);\n" + out_c += "\t\t(*env)->FatalError(env, \"A call to " + fn_line.fn_name + " in " + struct_name + " from rust threw an exception.\");\n" + out_c += "\t}\n" + if fn_line.ret_ty_info.arg_conv is not None: out_c += "\t" + fn_line.ret_ty_info.arg_conv.replace("\n", "\n\t") + "\n" out_c += "\t" + self.deconstruct_jenv().replace("\n", "\n\t").strip() + "\n"