1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 00:17:11 -07:00

Better error reporting.

This commit is contained in:
Cedric Beust 2016-07-10 23:02:42 -08:00
parent 360db9375c
commit 615750c287

View file

@ -35,10 +35,11 @@ class DependencyManager @Inject constructor(val executors: KobaltExecutors, val
// the first one that produces an actual file
val result = listOf(File(projectDirectory), Kobalt.context?.internalContext?.absoluteDir).map {
File(it, idPath)
}.first {
}.firstOrNull {
it.exists()
}
result
result ?: throw KobaltException("Couldn't find $id")
} else {
File(idPath)
}