[SPARK-10566] [CORE] SnappyCompressionCodec init exception handling masks important error information
When throwing an IllegalArgumentException in SnappyCompressionCodec.init, chain the existing exception. This allows potentially important debugging info to be passed to the user. Manual testing shows the exception chained properly, and the test suite still looks fine as well. This contribution is my original work and I license the work to the project under the project's open source license. Author: Daniel Imfeld <daniel@danielimfeld.com> Closes #8725 from dimfeld/dimfeld-patch-1.
This commit is contained in:
parent
c34fc19765
commit
6d8367807c
|
@ -148,7 +148,7 @@ class SnappyCompressionCodec(conf: SparkConf) extends CompressionCodec {
|
|||
try {
|
||||
Snappy.getNativeLibraryVersion
|
||||
} catch {
|
||||
case e: Error => throw new IllegalArgumentException
|
||||
case e: Error => throw new IllegalArgumentException(e)
|
||||
}
|
||||
|
||||
override def compressedOutputStream(s: OutputStream): OutputStream = {
|
||||
|
|
Loading…
Reference in a new issue