File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -308,7 +308,10 @@ object Phases {
308
308
def runOn (units : List [CompilationUnit ])(using Context ): List [CompilationUnit ] =
309
309
units.map { unit =>
310
310
val unitCtx = ctx.fresh.setPhase(this .start).setCompilationUnit(unit).withRootImports
311
- run(using unitCtx)
311
+ try run(using unitCtx)
312
+ catch case ex : Throwable =>
313
+ println(s " $ex while running $phaseName on $unit" )
314
+ throw ex
312
315
unitCtx.compilationUnit
313
316
}
314
317
Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ class TyperPhase(addRootImports: Boolean = true) extends Phase {
38
38
}
39
39
40
40
def typeCheck (using Context ): Unit = monitor(" typechecking" ) {
41
+ val unit = ctx.compilationUnit
41
42
try
42
- val unit = ctx.compilationUnit
43
43
if ! unit.suspended then
44
44
unit.tpdTree = ctx.typer.typedExpr(unit.untpdTree)
45
45
typr.println(" typed: " + unit.source)
@@ -48,6 +48,9 @@ class TyperPhase(addRootImports: Boolean = true) extends Phase {
48
48
ctx.run.nn.suppressions.reportSuspendedMessages(unit.source)
49
49
catch
50
50
case ex : CompilationUnit .SuspendException =>
51
+ case ex : Throwable =>
52
+ println(s " $ex while typechecking $unit" )
53
+ throw ex
51
54
}
52
55
53
56
def javaCheck (using Context ): Unit = monitor(" checking java" ) {
You can’t perform that action at this time.
0 commit comments