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

Better handling of exceptions in SessionUtil

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Neutral
    • Resolution: Won't Fix
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0
    • Component/s: core
    • Labels:
      None
    • Magnolia Release:
      5.0

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response: