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

Better handling of exceptions in SessionUtil

    XMLWordPrintable

Details

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

    Description

      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.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD