Skip to content

Commit

Permalink
Merge pull request #15 from bpow/develop
Browse files Browse the repository at this point in the history
Throw ExceptionInInitializerError rather than just printing stacktrace
  • Loading branch information
xerial committed Sep 7, 2012
2 parents a1c36bb + c2260cf commit b697c61
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/org/xerial/snappy/Snappy.java
Expand Up @@ -26,13 +26,17 @@

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;
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
*
Expand All @@ -44,7 +48,7 @@ public class Snappy
impl = SnappyLoader.load();
}
catch (Exception e) {
e.printStackTrace();
throw new ExceptionInInitializerError(e);
}
}

Expand Down

0 comments on commit b697c61

Please sign in to comment.