]> git.bitcoin.ninja Git - ldk-java/commitdiff
Fix exception catch in native library load failure to catch NPE
authorMatt Corallo <git@bluematt.me>
Sun, 26 Sep 2021 17:12:02 +0000 (17:12 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 27 Sep 2021 05:22:38 +0000 (05:22 +0000)
java_strings.py

index b93677aa87e0a900c63d4b3ecbe1ac7f5ddf8cd4..5452829d70275e4e547bcf47dfc50fc2dba4df44 100644 (file)
@@ -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);