Skip to content

Commit 70c2cae

Browse files
Don't trap unexpected compilation errors (#119)
This should allow to get the exception stack trace in 'scala-cli bloop output' when getting errors like Unexpected error when compiling project_…: 'null'
1 parent 162d07d commit 70c2cae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

frontend/src/main/scala/bloop/engine/tasks/CompileTask.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ object CompileTask {
294294
case FinalNormalCompileResult.HasException(project, err) =>
295295
val errMsg = err.fold(identity, _.getMessage)
296296
rawLogger.error(s"Unexpected error when compiling ${project.name}: '$errMsg'")
297+
err.foreach(_.printStackTrace(System.err))
297298
err.foreach(rawLogger.trace(_))
298299
case _ => () // Do nothing when the final compilation result is not an actual error
299300
}

0 commit comments

Comments
 (0)