Call error() on invalid number of arguments instead of just throwing … (#86)

This commit is contained in:
Christopher George
2019-09-25 21:09:36 +02:00
committed by Nicolas Cannasse
parent 058dd2e01e
commit 6cea0d97c2
+1 -1
View File
@@ -404,7 +404,7 @@ class Interp {
if( args.length < minParams ) {
var str = "Invalid number of parameters. Got " + args.length + ", required " + minParams;
if( name != null ) str += " for function '" + name+"'";
throw str;
error(ECustom(str));
}
// make sure mandatory args are forced
var args2 = [];