Velocity
  1. Velocity
  2. VELOCITY-435

ParseErrorException not thrown with #macro parse error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.5
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Windows XP, JDK 1.4.2_09

      Description

      I have just been reviewing the new error handlingin Velocity 1.5-dev.
      One change I have observed it that an invalid macro call, passing 2
      arguments instead of one will log an error message:

      [Velocity] [error] VM #writeForm: error : too many arguments to macro.
      Wanted 1 got 2
      [Velocity] [error] VM error writeForm. Null AST

      However it will not throw an ParseErrorException like it used to in
      1.5-dev. Please see the example below for the earlier behaviour:

      http://www.sunvolt.com/click-examples/exception.htm?actionLink=brokenBorderLink#

      I prefer earlier approach, as the error is explicit. The new approach
      logs an error message, but beyond that you would not have known that
      an error occured. The #writeForm() call is not even rendered, as is
      done with an invalid object reference.

      regards Malcolm Edgar

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Will Glass-Husain
            Reporter:
            Malcolm Edgar
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development