diff --git a/kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/internal/JSBuilder.kt b/kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/internal/JSBuilder.kt index c77f0c9ef..c6a36b538 100644 --- a/kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/internal/JSBuilder.kt +++ b/kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/internal/JSBuilder.kt @@ -70,9 +70,8 @@ internal class JSBuilder(val bodyCallback: JSBuilder.() -> BaseExpression) val k = key val o = `object` - if (!(js("k in o") as Boolean)) { - throw NoSuchElementException() - } + if (!(js("k in o") as Boolean)) + throw NoSuchElementException("Key $key is missing in the map.") js("o[k]") }