js2c: raise proper Exception, not a string

Fixes the following error message:

  TypeError: exceptions must be old-style classes or derived
  from BaseException, not str

Fixes #4303.
This commit is contained in:
Ben Noordhuis 2012-11-24 01:14:06 +01:00
parent 335f20896a
commit aa3441ae45

View File

@ -206,7 +206,7 @@ def ReadMacros(lines):
fun = eval("lambda " + ",".join(args) + ': ' + body)
macros[name] = PythonMacro(args, fun)
else:
raise ("Illegal line: " + line)
raise Exception("Illegal line: " + line)
return (constants, macros)