1.1 --- a/translator.py Sat Dec 10 22:02:51 2016 +0100
1.2 +++ b/translator.py Sun Dec 11 01:37:33 2016 +0100
1.3 @@ -1140,7 +1140,11 @@
1.4 # argument directly.
1.5
1.6 if parameters:
1.7 - argnum = parameters.index(arg.name)
1.8 + try:
1.9 + argnum = parameters.index(arg.name)
1.10 + except ValueError:
1.11 + raise TranslateError("Argument %s is not recognised." % arg.name,
1.12 + self.get_namespace_path(), n)
1.13 args[argnum+1] = str(argexpr)
1.14
1.15 # Otherwise, store the details in a separate collection.