blob: fa5932ff89742b2314a2bd506758afd3c49aa24f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import collection.parallel.CompositeThrowable
object Test {
def main(args: Array[String]) {
val foos = (1 to 1000).toSeq
try {
foos.par.map(i => if (i % 37 == 0) sys.error("i div 37") else i)
} catch {
case CompositeThrowable(thr) => println("Composite throwable")
}
}
}
|