[MAGNOLIA-4995] Better handling of exceptions in SessionUtil Created: 26/Apr/13  Updated: 25/Jun/13  Resolved: 29/Apr/13

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 5.0
Fix Version/s: 5.0

Type: Improvement Priority: Neutral
Reporter: Jozef Chocholacek Assignee: Daniel Lipp
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
duplicate
duplicates MAGNOLIA-4999 SessionUtil#getNode(String, String) s... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 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.



 Comments   
Comment by Daniel Lipp [ 29/Apr/13 ]

See MAGNOLIA-4999

Generated at Mon Feb 12 04:00:59 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.