Specify the method which threw an exception when aborting
authorMatt Corallo <git-ldk-build@bluematt.me>
Thu, 1 Jul 2021 21:15:07 +0000 (21:15 +0000)
committerMatt Corallo <git-ldk-build@bluematt.me>
Thu, 1 Jul 2021 21:15:07 +0000 (21:15 +0000)
java_strings.py

index c38d23b2f98725286050903cafe6990b5efb364e..f97ca9b7d0cff3ac4b416f175c8add0d10c9d040 100644 (file)
@@ -857,7 +857,7 @@ import java.util.Arrays;
 
                 out_c += "\tif ((*env)->ExceptionCheck(env)) {\n"
                 out_c += "\t\t(*env)->ExceptionDescribe(env);\n"
 
                 out_c += "\tif ((*env)->ExceptionCheck(env)) {\n"
                 out_c += "\t\t(*env)->ExceptionDescribe(env);\n"
-                out_c += "\t\t(*env)->FatalError(env, \"A Java interface method called from rust threw an exception.\");\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}\n"
 
                 if fn_line.ret_ty_info.arg_conv is not None: