projects
/
ldk-java
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
39ef1da
)
Fix exception catch in native library load failure to catch NPE
author
Matt Corallo
<git@bluematt.me>
Sun, 26 Sep 2021 17:12:02 +0000
(17:12 +0000)
committer
Matt Corallo
<git@bluematt.me>
Mon, 27 Sep 2021 05:22:38 +0000
(
05:22
+0000)
java_strings.py
patch
|
blob
|
history
diff --git
a/java_strings.py
b/java_strings.py
index b93677aa87e0a900c63d4b3ecbe1ac7f5ddf8cd4..5452829d70275e4e547bcf47dfc50fc2dba4df44 100644
(file)
--- 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());
Path libpath = new File(tmpdir.toPath().toString(), "liblightningjni.so").toPath();
Files.copy(is, libpath, StandardCopyOption.REPLACE_EXISTING);
Runtime.getRuntime().load(libpath.toString());
- } catch (
IO
Exception 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);
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);