From c3d4836a118d9b2a24d1eb8e2e824b6881b64f3b Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sun, 26 Jul 2020 10:23:51 +0300 Subject: [PATCH] Default error for Provider --- build.gradle.kts | 4 ++-- .../src/commonMain/kotlin/hep/dataforge/provider/Provider.kt | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index c3f71631..93d3c926 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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") diff --git a/dataforge-context/src/commonMain/kotlin/hep/dataforge/provider/Provider.kt b/dataforge-context/src/commonMain/kotlin/hep/dataforge/provider/Provider.kt index b1d769e2..72484ea9 100644 --- a/dataforge-context/src/commonMain/kotlin/hep/dataforge/provider/Provider.kt +++ b/dataforge-context/src/commonMain/kotlin/hep/dataforge/provider/Provider.kt @@ -43,7 +43,8 @@ interface Provider { /** * A map of direct children for specific target */ - fun provideTop(target: String): Map + fun provideTop(target: String): Map = + throw IllegalArgumentException("Target $target is not supported for $this") } fun Provider.provide(path: Path, targetOverride: String? = null): Any? {