#25 Improved reporting for compile errors

closed-accepted
Nicholas Cull
None
5
2001-12-02
2001-07-16
Dan Milstein
No

Modified error reporting so that errors detected at
compile time are returned as an entire HTML page rather
than a comment. The error text is displayed on the
page (*not* inside of a comment).

This improves things because it allows the developer to
immediately view the error (rather than getting a
completely empty page which is not even HTML compliant)
and then having to figure out that they should view
source.

This does mean that, if there is a compile-time error,
it would be possible for a user to see the error
message. However, since they'd otherwise be seeing a
completely and mysteriously blank page, I think that's
still a win (and these errors show up very, very early
in development).

Discussion

  • Dan Milstein
    Dan Milstein
    2001-07-16

    Fixes for Template.java and LinkedListTemplateBuilder.java

     
    Attachments
  • Nicholas Cull
    Nicholas Cull
    2001-12-01

    Logged In: YES
    user_id=137221

    I meant to include this as part of FreeMarker 1.7. My
    apologies. I'll aim to get this is for a future release.

     
  • Nicholas Cull
    Nicholas Cull
    2001-12-01

    • assigned_to: nobody --> run2000
     
  • Nicholas Cull
    Nicholas Cull
    2001-12-02

    • status: open --> closed
     
  • Nicholas Cull
    Nicholas Cull
    2001-12-02

    • status: closed --> closed-accepted
     
  • Nicholas Cull
    Nicholas Cull
    2001-12-02

    Logged In: YES
    user_id=137221

    Done. This has been re-coded a new TemplateExceptionListener
    implementation, and placed in the
    freemarker.template.utility package. It's not enabled by
    default (which maybe defeats the purpose?) but can be easily
    enabled by adding it to a TemplateEventAdapter, and passing
    it in at process time.