Skip to content

Commit 1b24bf2

Browse files
authored
Merge pull request #158 from tgodzik/compiler-error
bugfix: Handle NoClassDefFoundError coming from the compiler
2 parents e1a6468 + 45f30ca commit 1b24bf2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

backend/src/main/scala/sbt/internal/inc/bloop/internal/BloopHighLevelCompiler.scala

+4
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ final class BloopHighLevelCompiler(
137137
val msg = "Encountered a StackOverflowError coming from the compiler. You might need to restart your Bloop build server"
138138
logger.error(s"${msg}:\n${t.getStackTrace().mkString("\n")}")
139139
throw new CompileFailed(new Array(0), msg, new Array(0), t)
140+
case t: NoClassDefFoundError =>
141+
val msg = "Encountered a NoClassDefFoundError coming from the compiler. You might need to clean compile your workspace"
142+
logger.error(s"${msg}:\n${t.getStackTrace().mkString("\n")}")
143+
throw new CompileFailed(new Array(0), msg, new Array(0), t)
140144
case NonFatal(t) =>
141145
// If scala compilation happens, complete the java promise so that it doesn't block
142146
JavaCompleted.tryFailure(t)

0 commit comments

Comments
 (0)