Velocity
  1. Velocity
  2. VELOCITY-284

MethodInvocationException is handled inconsistently

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4, 1.5
    • Fix Version/s: 1.5
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: Other

      Description

      It appears that the exception handling is different depending on whether the
      method is invoked as a passed parameter to a velocimacro or just in a template.

      Ex.

      #doTextLink( $

      {myObj.exception})

      ${myObj.exception}

      The first #doTextLink macro will throw an exception, but it will be logged and
      ignored. However, the second invocation will throw the exception properly.

      I have a patch that should fix this behavior. The exception just needs to be
      rethrown up the call stack. A small signature change to a couple of methods.

      Thanks,

      Mike Rettig

        Activity

        Mike Rettig created issue -
        Jeff Turner made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 30220 12315154
        Will Glass-Husain made changes -
        Bugzilla Id 30220
        Type Bug [ 1 ] Improvement [ 4 ]
        Fix Version/s 2.0 [ 12310291 ]
        Description It appears that the exception handling is different depending on whether the
        method is invoked as a passed parameter to a velocimacro or just in a template.

        Ex.

        #doTextLink( ${myObj.exception})

        ${myObj.exception}

        The first #doTextLink macro will throw an exception, but it will be logged and
        ignored. However, the second invocation will throw the exception properly.

        I have a patch that should fix this behavior. The exception just needs to be
        rethrown up the call stack. A small signature change to a couple of methods.

        Thanks,

        Mike Rettig
        It appears that the exception handling is different depending on whether the
        method is invoked as a passed parameter to a velocimacro or just in a template.

        Ex.

        #doTextLink( ${myObj.exception})

        ${myObj.exception}

        The first #doTextLink macro will throw an exception, but it will be logged and
        ignored. However, the second invocation will throw the exception properly.

        I have a patch that should fix this behavior. The exception just needs to be
        rethrown up the call stack. A small signature change to a couple of methods.

        Thanks,

        Mike Rettig
        Priority Major [ 3 ] Minor [ 4 ]
        Environment Operating System: All
        Platform: Other
        Operating System: All
        Platform: Other
        Assignee Velocity-Dev List [ velocity-dev@jakarta.apache.org ]
        Henning Schmiedehausen made changes -
        Affects Version/s 1.5 [ 12310253 ]
        Bugzilla Id 30220
        Fix Version/s 1.6 [ 12310290 ]
        Henning Schmiedehausen made changes -
        Component/s Engine [ 12311337 ]
        Component/s Source [ 12310214 ]
        Bugzilla Id 30220
        Will Glass-Husain made changes -
        Assignee Will Glass-Husain [ wglass ]
        Will Glass-Husain made changes -
        Fix Version/s 2.0 [ 12310291 ]
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 1.6 [ 12310290 ]
        Fix Version/s 1.5 [ 12310253 ]
        Henning Schmiedehausen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Workflow jira [ 12325159 ] Default workflow, editable Closed status [ 12551744 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551744 ] jira [ 12552280 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development