Skip to content

Commit 16bf56d

Browse files
committed
Chain exceptions from Snappy
When throwing an IllegalArgumentException in SnappyCompressionCodec.init, chain the existing exception. This allows potentially important debugging info to be passed to the user. Fixes [SPARK-10566]
1 parent 5f46444 commit 16bf56d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/org/apache/spark/io/CompressionCodec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class SnappyCompressionCodec(conf: SparkConf) extends CompressionCodec {
148148
try {
149149
Snappy.getNativeLibraryVersion
150150
} catch {
151-
case e: Error => throw new IllegalArgumentException
151+
case e: Error => throw new IllegalArgumentException(e)
152152
}
153153

154154
override def compressedOutputStream(s: OutputStream): OutputStream = {

0 commit comments

Comments
 (0)