From 317ca2dace089af18baed20ce35fb6196b8541c0 Mon Sep 17 00:00:00 2001 From: "Taro L. Saito" Date: Fri, 3 Jun 2011 12:04:35 +0900 Subject: [PATCH] issue an error when failed to load any library --- src/main/java/org/xerial/snappy/LoadSnappy.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/xerial/snappy/LoadSnappy.java b/src/main/java/org/xerial/snappy/LoadSnappy.java index e8465c1..55b317a 100755 --- a/src/main/java/org/xerial/snappy/LoadSnappy.java +++ b/src/main/java/org/xerial/snappy/LoadSnappy.java @@ -196,14 +196,14 @@ public class LoadSnappy return; } } + // Try to load snappy in LD_PATH try { - System.loadLibrary("snappyjava"); + System.loadLibrary("snappy"); isLoaded = true; } catch (UnsatisfiedLinkError e) { - isLoaded = false; + throw new SnappyError(SnappyErrorCode.FAILED_TO_LOAD_NATIVE_LIBRARY, e); } - return; } private static void getNativeLibraryFolderForTheCurrentOS() {