Skip to content

Commit

Permalink
Merge pull request #156 from tgodzik/print-all
Browse files Browse the repository at this point in the history
chore: Add full error stack trace
  • Loading branch information
tgodzik authored Nov 16, 2023
2 parents 7b633eb + fc48b14 commit c2bfcb5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions frontend/src/main/scala/bloop/engine/tasks/CompileTask.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import bloop.engine.tasks.compilation._
import bloop.io.ParallelOps
import bloop.io.ParallelOps.CopyMode
import bloop.io.{Paths => BloopPaths}
import bloop.logging.BloopLogger
import bloop.logging.DebugFilter
import bloop.logging.Logger
import bloop.logging.LoggerAction
Expand All @@ -36,7 +37,6 @@ import bloop.tracing.BraveTracer
import monix.execution.CancelableFuture
import monix.reactive.MulticastStrategy
import monix.reactive.Observable

object CompileTask {
private implicit val logContext: DebugFilter = DebugFilter.Compilation
def compile[UseSiteLogger <: Logger](
Expand Down Expand Up @@ -292,10 +292,8 @@ object CompileTask {
} else {
results.foreach {
case FinalNormalCompileResult.HasException(project, err) =>
val errMsg = err.fold(identity, _.getMessage)
rawLogger.error(s"Unexpected error when compiling ${project.name}: '$errMsg'")
err.foreach(_.printStackTrace(System.err))
err.foreach(rawLogger.trace(_))
val errMsg = err.fold(identity, BloopLogger.prettyPrintException)
rawLogger.error(s"Unexpected error when compiling ${project.name}: $errMsg")
case _ => () // Do nothing when the final compilation result is not an actual error
}

Expand Down

0 comments on commit c2bfcb5

Please sign in to comment.