Call error() on invalid number of arguments instead of just throwing … (#86)
This commit is contained in:
committed by
Nicolas Cannasse
parent
058dd2e01e
commit
6cea0d97c2
+1
-1
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user