From de092b92bbf0459cf0587807ab33b629e1b0887a Mon Sep 17 00:00:00 2001 From: Lou Hamersly Date: Sun, 14 Jul 2019 01:33:16 -0400 Subject: [PATCH] Wrap potential IOExceptions during native file extraction --- .../main/java/com/jme3/system/NativeLibraryLoader.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jme3-desktop/src/main/java/com/jme3/system/NativeLibraryLoader.java b/jme3-desktop/src/main/java/com/jme3/system/NativeLibraryLoader.java index 707937e78..c5faa0a74 100644 --- a/jme3-desktop/src/main/java/com/jme3/system/NativeLibraryLoader.java +++ b/jme3-desktop/src/main/java/com/jme3/system/NativeLibraryLoader.java @@ -624,8 +624,8 @@ public final class NativeLibraryLoader { in = conn.getInputStream(); } catch (IOException ex) { // Maybe put more detail here? Not sure.. - throw new UnsatisfiedLinkError("Failed to open file: '" + url + - "'. Error: " + ex); + throw new UncheckedIOException("Failed to open file: '" + url + + "'. Error: " + ex, ex); } File targetFile = new File(extactionDirectory, loadedAsFileName); @@ -665,8 +665,8 @@ public final class NativeLibraryLoader { if (ex.getMessage().contains("used by another process")) { return; } else { - throw new UnsatisfiedLinkError("Failed to extract native " - + "library to: " + targetFile); + throw new UncheckedIOException("Failed to extract native " + + "library to: " + targetFile, ex); } } finally { // XXX: HACK. Vary loading method based on library name..