RC-Paves3-build / plovr

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

Error during serve: message is undefined #30

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In the function plovr.writeErrors, this line gives a "message is undefined" 
warning:

    if (message.indexOf(prefix) == 0) {

At that point, message == error['message'] while 'error' is the object

    { input: "caleftar.js", isError: false, lineNumber: 220 }.

This error can be worked around by checking if error['message'] is not 
undefined, but I'm not sure how the error handling is supposed to work.

I'm using the latest version cf41182d522c+ in Windows 7.

Original issue reported on code.google.com by sander.d...@gmail.com on 24 Jan 2011 at 6:13

GoogleCodeExporter commented 8 years ago
Hmm, can you include the content of what line 220 of caleftar.js was? Every 
error should have some sort of message.

As you can see in 
http://code.google.com/p/plovr/source/browse/src/org/plovr/CompilationErrorSeria
lizer.java, a message does get added, though it won't get written out during 
JSON serialization if the message is null.

It could be a bug in the Closure Compiler, which could get fixed in the next 
plovr release which will include a more recent version of the Compiler.

Original comment by bolinf...@gmail.com on 24 Apr 2011 at 8:38