Throw a TypeError when a non-object is passed where one is expected.

This commit is contained in:
Ms2ger 2014-07-30 17:55:28 +02:00
parent ea621676f2
commit 83cc23089a
7 changed files with 83 additions and 18 deletions

View file

@ -497,7 +497,7 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None,
return CGWrapper(
CGGeneric(
failureCode or
('//XXXjdm ThrowErrorMessage(cx, MSG_NOT_OBJECT, "%s");\n'
('throw_type_error(cx, "%s is not an object.");\n'
'%s' % (firstCap(sourceDescription), exceptionCode))),
post="\n")
def onFailureBadType(failureCode, typeName):