Skip to content

Commit c7b6d25

Browse files
committed
#109 follow-up - improved error message when no source root found for specified path, shows all source root paths for easier problems detection.
1 parent 5929e45 commit c7b6d25

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: scalac-scoverage-plugin/src/main/scala/scoverage/IOUtils.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ object IOUtils {
9595
)
9696
sourceRoot match {
9797
case Some(path: String) => src.replace(path, "")
98-
case _ => throw new RuntimeException(s"No source root found for '$src'"); //TODO Change exception class
98+
case _ =>
99+
val fmtSourcePaths: String = sourcePaths.mkString("'", "', '", "'")
100+
throw new RuntimeException(s"No source root found for '$src' (source roots: $fmtSourcePaths)");
99101
}
100102
}
101103

0 commit comments

Comments
 (0)