operator-builtin.go: some error messages improved

This commit is contained in:
Celestino Amoroso 2024-06-09 07:36:12 +02:00
parent f347b15146
commit 53bcf90d2a

View File

@ -37,11 +37,11 @@ func evalBuiltin(ctx ExprContext, self *term) (v any, err error) {
if ImportInContext(module) {
count++
} else {
err = self.Errorf("unknown module %q", module)
err = self.Errorf("unknown builtin module %q", module)
break
}
} else {
err = self.Errorf("expected string at item nr %d, got %T", it.Index()+1, moduleSpec)
err = self.Errorf("expected string at item nr %d, got %s", it.Index()+1, typeName(moduleSpec))
break
}
}