Fix exception catch in native library load failure to catch NPE
[ldk-java] / 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);