projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
335f208
)
js2c: raise proper Exception, not a string
author
Ben Noordhuis
<info@bnoordhuis.nl>
Sat, 24 Nov 2012 00:14:06 +0000
(
01:14
+0100)
committer
Ben Noordhuis
<info@bnoordhuis.nl>
Sat, 24 Nov 2012 00:14:09 +0000
(
01:14
+0100)
Fixes the following error message:
TypeError: exceptions must be old-style classes or derived
from BaseException, not str
Fixes #4303.
tools/js2c.py
patch
|
blob
|
history
diff --git
a/tools/js2c.py
b/tools/js2c.py
index
7c83c67
..
772a0f5
100755
(executable)
--- a/
tools/js2c.py
+++ b/
tools/js2c.py
@@
-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)