dyoo / WeScheme

29 stars 16 forks source link

compilation errors at build time are incorrectly alerted as RuntimeException #37

Closed dyoo closed 12 years ago

dyoo commented 12 years ago

Trolling through the server logs, I see:

Uncaught exception from servlet java.lang.RuntimeException: thunder girl:101:7: read: expected a )' to close('; indentation suggests a missing `)' before line 107 at org.wescheme.project.Compiler.compile(Compiler.java:67) at org.wescheme.project.Program.build(Program.java:144) at org.wescheme.servlet.Build.doPost(Build.java:44)

...

with regards to:

http://www.wescheme.org/openEditor?publicId=flood-gutsy-toxic-quark-peppy

This error should be treated more gracefully.

dyoo commented 12 years ago

Not quite fixed. Changed to generate HTTP 400 with an appropriate statusCode that the ajax code is supposed to read, but for some reason, on production appengine, all the statusText gets replaced with the absurdly unhelpful "Bad request". I think we have to simply return a structured value that semantically means that something bad happened. Somewhat disappointing, but oh well.

dyoo commented 12 years ago

Fixed now by the multi-color highlighting in the development version. Closing.