Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2272

improve syntax error output to make it easier to quickly see the problem (chop off the first 3 lines)

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Logging
    • Labels:
      None

      Description

      I have a suggestion for improving the parser syntax error printing that would make CFEngine easier to use. It would make it easier to more quickly read and understand errors.

      In a nutshell, I suggest you chop off the first three lines.

      Take a look at the following example. Input contains syntax error, the promise type is missing:

      bundle agent main {

      testme::

      Output (with line numbering added by yours truly):

      1 test.cf:3:8: error: syntax error
      2 testme::
      3 ^
      4 test.cf:3:8: error: Expected promise type, got 'testme::'
      5 testme::
      6 ^

      The first line says "syntax error" but doesn't give any details. The details then appear on line 4 (which should be the first line, as far as usability is concerned).

      Why not chop off the first three lines?

      It's been great watching the product improve over the years. Continue!

        Attachments

          Activity

            People

            • Assignee:
              a10003 Eystein Maloy Stenberg
              Reporter:
              atsaloli Aleksey Tsalolikhin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Summary Panel