mirror of https://github.com/sbt/sbt.git
Merge pull request #1102 from gkossakowski/inc-error-handling
Improve error handling in incremental compiler
This commit is contained in:
commit
7241428137
|
|
@ -46,5 +46,12 @@ object IC extends IncrementalCompiler[Analysis, AnalyzingCompiler]
|
|||
}
|
||||
|
||||
def readCacheUncaught(file: File): (Analysis, CompileSetup) =
|
||||
Using.fileReader(IO.utf8)(file) { reader => TextAnalysisFormat.read(reader) }
|
||||
Using.fileReader(IO.utf8)(file) { reader =>
|
||||
try {
|
||||
TextAnalysisFormat.read(reader)
|
||||
} catch {
|
||||
case ex: sbt.inc.ReadException =>
|
||||
throw new java.io.IOException(s"Error while reading $file", ex)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,8 +225,8 @@ object TextAnalysisFormat {
|
|||
if (nameHashing)
|
||||
Relations.make(srcProd, binaryDep, memberRefSrcDeps, inheritanceSrcDeps, classes, names)
|
||||
else {
|
||||
assert(names.all.isEmpty, s"When `nameHashing` is disabled `names` relation " +
|
||||
"should be empty: $names")
|
||||
assert(names.all.isEmpty, "When `nameHashing` is disabled `names` relation " +
|
||||
s"should be empty: $names")
|
||||
Relations.make(srcProd, binaryDep, directSrcDeps, publicInheritedSrcDeps, classes)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue