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

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551279 ] jira [ 12552186 ]
        Mark Thomas made changes -
        Workflow jira [ 12351535 ] Default workflow, editable Closed status [ 12551279 ]
        Henning Schmiedehausen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Will Glass-Husain made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Will Glass-Husain made changes -
        Assignee Will Glass-Husain [ wglass ]
        Henning Schmiedehausen made changes -
        Component/s Engine [ 12311337 ]
        Will Glass-Husain made changes -
        Attachment macroargumenterror.patch [ 12324340 ]
        Will Glass-Husain made changes -
        Field Original Value New Value
        Fix Version/s 1.5 [ 12310253 ]
        Malcolm Edgar created 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