From: Matt Corallo Date: Sun, 26 Sep 2021 17:12:02 +0000 (+0000) Subject: Fix exception catch in native library load failure to catch NPE X-Git-Tag: v0.0.101.1^2~5 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=5fa9d3629264036cedc44283cf5fd5eb78bb73f2;p=ldk-java Fix exception catch in native library load failure to catch NPE --- 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);