sjsonnet
sjsonnet copied to clipboard
function name should be included in the error message when not bound in call
In https://github.com/databricks/sjsonnet/issues/39, @eregon report:
https://github.com/databricks/sjsonnet/issues/39#issuecomment-2910409056
I think he is right here, and I think the function name should be included in the error message, eg:
test("unboundParam") {
val ex = intercept[Exception] {
eval(
"""local newParams(x, y) = {
| x: x,
| y: y,
|};
|
|local params = newParams("a");
|
|params.y
|
""".stripMargin,
useNewEvaluator = useNewEvaluator
)
}
assert(ex.getMessage.contains("Function parameter y not bound in call"))
}
can be Function parameter y not bound in call to function newParams