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.
pull/24504/head
Ben Noordhuis 2012-11-24 01:14:06 +01:00
parent 335f20896a
commit aa3441ae45
1 changed files with 1 additions and 1 deletions

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)