Merge pull request #15 from bpow/develop

Throw ExceptionInInitializerError rather than just printing stacktrace
This commit is contained in:
Taro L. Saito 2012-09-06 19:24:48 -07:00
commit b697c61df8
1 changed files with 5 additions and 1 deletions

View File

@ -26,6 +26,7 @@ package org.xerial.snappy;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.lang.ExceptionInInitializerError;
import java.net.URL;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
@ -34,6 +35,9 @@ import java.util.Properties;
/**
* Snappy API for data compression/decompression
*
* Note: if the native libraries cannot be loaded, then an ExceptionInInitializerError
* will be thrown at first use of this class.
*
* @author leo
*
*/
@ -44,7 +48,7 @@ public class Snappy
impl = SnappyLoader.load();
}
catch (Exception e) {
e.printStackTrace();
throw new ExceptionInInitializerError(e);
}
}