Skip to content

Commit

Permalink
Throw error when cannot load library
Browse files Browse the repository at this point in the history
  • Loading branch information
CGDogan authored Aug 28, 2023
1 parent 19d7fb9 commit 39f944f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ public JPEGTurboServiceImpl() {
logger = Logger.getLogger(NATIVE_LIB_CLASS);
logger.setLevel(Level.SEVERE);
if (!libraryLoaded) {
NativeLibraryUtil.loadNativeLibrary(TJ.class, "turbojpeg");
libraryLoaded = true;
libraryLoaded = NativeLibraryUtil.loadNativeLibrary(TJ.class, "turbojpeg");
if (!libraryLoaded) {
throw new RuntimeException("TurboJPEG could not be loaded");
}
}
}

Expand Down

0 comments on commit 39f944f

Please sign in to comment.