Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-758

Include line number in message "#parse() null argument"

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.6.2
    • 1.7, 2.0
    • Engine
    • None

    Description

      Assume the following scenarios:

      Scenario A)
      A template has the following line:
      #parse("never-found-template.vm")

      Scenario B)
      A template has the following line:
      #parse($nonsense)

      Assume further, that neither the "never-found-template.vm" is present nor the variable "$nonsense" is set.

      In scenario A) the log reports "#parse(): cannot find template 'never-found-template.vm', called from template ... at (1, 1)"
      In scenario B) the log says "#parse() null argument"

      Problem:
      In scenario B), having multiple nested #parse-Statements, it's hard to find the error finally.

      Sugestion / Feature request:
      Include source information and line numbers when reporting "#parse() null argument" - analogous to scenario A)

      Thanks and kind regards

      Edy Hinzen

      Attachments

        1. velocity-758.patch
          3 kB
          Jarkko Viinamäki

        Activity

          People

            Unassigned Unassigned
            edyhinzen Edy Hinzen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: