biplav / embeddedjavascript

Automatically exported from code.google.com/p/embeddedjavascript
Other
0 stars 0 forks source link

Error compiling with Closure Compiler #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When compiling ejs.js with Closure Compiler 
(https://code.google.com/p/closure-compiler/), I get the following error:

ERROR - The use of scope variable e is not allowed within a catch block with a 
catch exception of the same name.
                    var e = new Error();

This is triggered by ejs.js:365, near the end of the EJS.Compiler.prototype 
definition. The fix is pretty easy: just name the inner declaration of 'e' 
something else.

We're using EJS as part of much larger JS app, and would rather compile it 
together with our other files, rather than use the pre-compiled version. In 
addition, we don't use the view helpers, so this helps cuts down on file size.

Original issue reported on code.google.com by hes...@pubvest.com on 2 Apr 2013 at 10:24