Wrap potential IOExceptions during native file extraction

accellbaker
Lou Hamersly 6 years ago committed by empirephoenix
parent e31a047746
commit de092b92bb
  1. 8
      jme3-desktop/src/main/java/com/jme3/system/NativeLibraryLoader.java

@ -624,8 +624,8 @@ public final class NativeLibraryLoader {
in = conn.getInputStream(); in = conn.getInputStream();
} catch (IOException ex) { } catch (IOException ex) {
// Maybe put more detail here? Not sure.. // Maybe put more detail here? Not sure..
throw new UnsatisfiedLinkError("Failed to open file: '" + url + throw new UncheckedIOException("Failed to open file: '" + url +
"'. Error: " + ex); "'. Error: " + ex, ex);
} }
File targetFile = new File(extactionDirectory, loadedAsFileName); File targetFile = new File(extactionDirectory, loadedAsFileName);
@ -665,8 +665,8 @@ public final class NativeLibraryLoader {
if (ex.getMessage().contains("used by another process")) { if (ex.getMessage().contains("used by another process")) {
return; return;
} else { } else {
throw new UnsatisfiedLinkError("Failed to extract native " throw new UncheckedIOException("Failed to extract native "
+ "library to: " + targetFile); + "library to: " + targetFile, ex);
} }
} finally { } finally {
// XXX: HACK. Vary loading method based on library name.. // XXX: HACK. Vary loading method based on library name..

Loading…
Cancel
Save