Velocity
  1. Velocity
  2. VELOCITY-654

Fix correct template name reporting, enhance error logging information

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.6.1, 1.7
    • Component/s: Engine
    • Labels:
      None

      Description

      Fix template name reporting for #include and #parse if an exception occurs. Error reporting in Velocity tends to use context.getTemplateName() which is intended for scoping information, and does not always provide the template name containing the node or directive that generates an error. This adds a templateName field to the Directive object and assigns it on creation, if a template name is available.

      Also added template and location info when logging errors thrown from #parse. This compliments the pseudo-stack trace that is already logged to error for macros. So, now a complete trace is logged to error of the macro and template layers with template name and location. Yea!

      1. 654_2.patch
        9 kB
        Byron Foster
      2. 654.patch
        9 kB
        Byron Foster
      3. patch.txt
        10 kB
        Nathan Bubna

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Byron Foster
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development