From 5fa9d3629264036cedc44283cf5fd5eb78bb73f2 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 26 Sep 2021 17:12:02 +0000 Subject: [PATCH] Fix exception catch in native library load failure to catch NPE --- java_strings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java_strings.py b/java_strings.py index b93677aa..5452829d 100644 --- a/java_strings.py +++ b/java_strings.py @@ -56,7 +56,7 @@ public class bindings { Path libpath = new File(tmpdir.toPath().toString(), "liblightningjni.so").toPath(); Files.copy(is, libpath, StandardCopyOption.REPLACE_EXISTING); Runtime.getRuntime().load(libpath.toString()); - } catch (IOException e) { + } catch (Exception e) { System.err.println("Failed to load LDK native library."); System.err.println("System LDK native library load failed with: " + system_load_err); System.err.println("Resource-based LDK native library load failed with: " + e); -- 2.30.2