|
Scala example source code file (Exceptional.scala)
The Exceptional.scala Scala example source code
package scala.tools.nsc
package util
import java.util.concurrent.ExecutionException
import java.lang.reflect.{ InvocationTargetException, UndeclaredThrowableException }
object Exceptional {
def unwrap(x: Throwable): Throwable = x match {
case _: InvocationTargetException |
_: ExceptionInInitializerError |
_: UndeclaredThrowableException |
_: ExecutionException
if x.getCause != null =>
unwrap(x.getCause)
case _ => x
}
}
Other Scala source code examplesHere is a short list of links related to this Scala Exceptional.scala source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.