Skip to content

Commit f1f5d9b

Browse files
committed
Cleanup native library loading error handling
1 parent 473b638 commit f1f5d9b

File tree

2 files changed

+4
-2
lines changed
  • native-compression
    • libaec-jna/src/main/java/edu/ucar/unidata/compression/jna/libaec
    • libblosc2-jna/src/main/java/edu/ucar/unidata/compression/jna/libblosc2

2 files changed

+4
-2
lines changed

native-compression/libaec-jna/src/main/java/edu/ucar/unidata/compression/jna/libaec/LibAec.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ public final class LibAec {
5151
: "libaec C library not found. To read this data, include the libaec-native jar in your classpath "
5252
+ "(edu.ucar:libaec-native) or install libaec on your system.";
5353
log.error(message);
54-
throw new RuntimeException(message, ule);
54+
log.debug("Reason: ", ule);
55+
throw new RuntimeException(message);
5556
}
5657
}
5758
}

native-compression/libblosc2-jna/src/main/java/edu/ucar/unidata/compression/jna/libblosc2/LibBlosc2.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ public final class LibBlosc2 {
5656
: "libblosc2 C library not found. To read this data, include the libblosc2-native jar in your classpath "
5757
+ "(edu.ucar:libblosc2-native) or install libblosc2 on your system.";
5858
log.error(message);
59-
throw new RuntimeException(message, ule);
59+
log.debug("Reason: ", ule);
60+
throw new RuntimeException(message);
6061
}
6162
}
6263
}

0 commit comments

Comments
 (0)