Skip to content

Commit 7ca0a7f

Browse files
committed
Avoid exit
1 parent 6a27388 commit 7ca0a7f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compiler/scala/tools/nsc/reporters/DisplayReporter.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ package reporters
1010
import java.io.{BufferedReader, PrintWriter}
1111
import scala.reflect.internal.{Reporter => InternalReporter, ForwardingReporter}
1212
import scala.reflect.internal.util.{Position, StringOps}
13+
import scala.tools.util.SystemExit
1314

1415
import Position.formatMessage
1516
import StringOps.{countElementsAsString => countAs, trimAllTrailingSpace => trimTrailing}
@@ -61,7 +62,7 @@ trait PrintReporter extends InternalReporter {
6162
reader.read match {
6263
case 'a' | 'A' =>
6364
new Throwable().printStackTrace(writer)
64-
System.exit(1)
65+
throw SystemExit(1)
6566
case 's' | 'S' =>
6667
new Throwable().printStackTrace(writer)
6768
writer.println()

0 commit comments

Comments
 (0)