Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-4995

Better handling of exceptions in SessionUtil

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Neutral Neutral
    • 5.0
    • 5.0
    • core
    • None

      The getNode and getNodeByIdentifier methods of the info.magnolia.jcr.util.SessionUtil class return null if the requested node is not found, but they use log.error() in such case. It does not make much sense from a developer's point of view, just pollutes the logs with unnecessary stack traces.

      The solution should be either to decrease the logging level to log.debug(), or at least catch the PathNotFoundException first and use the log.debug() for it (without stack trace), and use log.error() only for other kinds of the RepositoryException.

        Acceptance criteria

              dlipp Daniel Lipp
              jchocholacek Jozef Chocholacek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD