Uploaded image for project: 'Yaml extensions (closed)'
  1. Yaml extensions (closed)
  2. YAMLEXT-3

Improve logging and possibly avoid exceptions when syntax is incorrect

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Do
    • Neutral
    • None

    Description

      In some cases where something is not configured correctly a log message could help the developer more quickly and painlessly achieve there goal.
      In some cases when the extend tags are not used correctly, seemingly unrelated exceptions occur. Perhaps the parsing could be smarter and log a warning, but then handle the exception. Otherwise a developer could get confused about the actual source of the problem.

      I'll try to identify a few of these cases.

      Ideally problems would be reported as soon as the YAML file is detected and loaded by the system, not only when the definition is used.
      For example, if i work on a dialog definition, it would be helpful to get the message as soon as I edit the file, not only when the dialog gets opened.

      If possible, log messages should specify the file where the problem occurs.

      When using !extend, if the target file does not exist, an exception occurs. It would be helpful if a simple log message would be printed first. And possibly the exception could be avoided.
      When using !extend-def, if the target definition does not exist, print an error or warning to the log.
      When using !extend-jcr, if the target jcr address does not exist, print an error or warning to the log.

      When there is a space between the tag and the address (!extend: /mtk/dialogs/components/link.yaml), a note should be written to log. Currently one gets a seemingly unrelated exception.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                apchelintcev Aleksandr Pchelintcev
                czimmermann Christopher Zimmermann
                Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: