Skip to content
Permalink
Browse files

codegen: throw type error when encountering an unknown argument

  • Loading branch information...
gterzian committed Sep 4, 2019
1 parent 39bd455 commit 5149aefd856042c70ca5034adad0bcf7def67e37
@@ -492,7 +492,7 @@ def pickFirstSignature(condition, filterLambda):
else:
# Just throw; we have no idea what we're supposed to
# do with this.
caseBody.append(CGGeneric("throw_internal_error(*cx, \"Could not convert JavaScript argument\");\n"
caseBody.append(CGGeneric("throw_type_error(*cx, \"Could not convert JavaScript argument\");\n"
"return false;"))

argCountCases.append(CGCase(str(argCount),
@@ -1,2 +1,7 @@
[iirfilter.html]
expected: CRASH
expected: ERROR
[X createIIRFilter with unnormalized coefficients incorrectly threw TypeError: \"context.createIIRFilter is not a function\".]
expected: FAIL

[X createIIRFilter with normalized coefficients incorrectly threw TypeError: \"context.createIIRFilter is not a function\".]
expected: FAIL

0 comments on commit 5149aef

Please sign in to comment.
You can’t perform that action at this time.