Default error for Provider

This commit is contained in:
Alexander Nozik 2020-07-26 10:23:51 +03:00
parent 8529c725e7
commit c3d4836a11
2 changed files with 4 additions and 3 deletions

View File

@ -1,12 +1,12 @@
plugins {
val toolsVersion = "0.5.1"
val toolsVersion = "0.5.2"
id("scientifik.mpp") version toolsVersion apply false
id("scientifik.jvm") version toolsVersion apply false
id("scientifik.publish") version toolsVersion apply false
id("org.jetbrains.dokka") version "0.10.1"
}
val dataforgeVersion by extra("0.1.8")
val dataforgeVersion by extra("0.1.9-dev")
val bintrayRepo by extra("dataforge")
val githubProject by extra("dataforge-core")

View File

@ -43,7 +43,8 @@ interface Provider {
/**
* A map of direct children for specific target
*/
fun provideTop(target: String): Map<Name, Any>
fun provideTop(target: String): Map<Name, Any> =
throw IllegalArgumentException("Target $target is not supported for $this")
}
fun Provider.provide(path: Path, targetOverride: String? = null): Any? {