common-errors.go: exported all error functions.
builtin-string.go: renamed all functions from somthingStr() to strSomething()
This commit is contained in:
+2
-2
@@ -26,7 +26,7 @@ func checkFunctionCall(ctx ExprContext, name string, varParams *[]any) (err erro
|
||||
if info, exists, owner := GetFuncInfo(ctx, name); exists {
|
||||
passedCount := len(*varParams)
|
||||
if info.MinArgs() > passedCount {
|
||||
err = errTooFewParams(name, info.MinArgs(), info.MaxArgs(), passedCount)
|
||||
err = ErrTooFewParams(name, info.MinArgs(), info.MaxArgs(), passedCount)
|
||||
}
|
||||
for i, p := range info.Params() {
|
||||
if i >= passedCount {
|
||||
@@ -37,7 +37,7 @@ func checkFunctionCall(ctx ExprContext, name string, varParams *[]any) (err erro
|
||||
}
|
||||
}
|
||||
if err == nil && info.MaxArgs() >= 0 && info.MaxArgs() < len(*varParams) {
|
||||
err = errTooMuchParams(name, info.MaxArgs(), len(*varParams))
|
||||
err = ErrTooMuchParams(name, info.MaxArgs(), len(*varParams))
|
||||
}
|
||||
if err == nil && owner != ctx {
|
||||
ctx.RegisterFuncInfo(info)
|
||||
|
||||
Reference in New Issue
Block a user