We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07ae23c commit decb9b7Copy full SHA for decb9b7
tests/run/t6827.scala
@@ -8,6 +8,16 @@ object Test extends App {
8
it.copyToArray(arr, start, len)
9
"ok"
10
} catch {
11
+ case e: ArrayIndexOutOfBoundsException =>
12
+ // Special-case printing this exception because the toString changed in Java 11
13
+ val java11toString = """ArrayIndexOutOfBoundsException: Index (-?\d+).*""".r
14
+
15
+ e.toString match {
16
+ case java11toString(index) =>
17
+ s"ArrayIndexOutOfBoundsException: $index"
18
+ case str =>
19
+ str
20
+ }
21
case e: Exception => e.toString
22
}
23
println("%s: %s" format (label, status))
0 commit comments