-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
| model.put(VALUE_MODEL_ATTRIBUTE, e.getTargetException().getCause().getMessage()); |
Scenario:
- a user JMX attribute getter throws
RuntimeExceptionwith nullgetCause()(for whatever reason; it is permitted by the exception contract). - it is picked up by the cited catch inside JMiniX. It is correctly logged by this line:
log.warn("Error accessing attribute", e); - But the next line (referenced above) incorrectly assumes
getCause()is always not null and causes NPE on callinggetMessage(). - So the user sees not the original error in browser, but overwritten stack trace, this time with NPE, logged by
org.restlet.resource.ServerResource#doCatch (getLogger().log(level, "Exception or error caught in server resource", throwable);)
It makes it hard to debug jmx method failures in browser (you see the irrelevant NPE in causedBy section), you have to go to the app logs to find the original causedBy exception.
Metadata
Metadata
Assignees
Labels
No labels