[
https://issues.apache.org/jira/browse/OAK-4071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15171896#comment-15171896
]
Chetan Mehrotra commented on OAK-4071:
--------------------------------------
bq. getNodeDesc() is not much of a description though, rather the node's path.
Maybe a cleaner approach would be to use a format function to build the
exception message.
Thanks Michael for feedback. I was being lazy with previous match. Per your
suggestion used format to construct better exception message.
Done with https://svn.apache.org/r1732898
> Include node path in VersionException
> -------------------------------------
>
> Key: OAK-4071
> URL: https://issues.apache.org/jira/browse/OAK-4071
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core
> Reporter: Chetan Mehrotra
> Assignee: Chetan Mehrotra
> Priority: Minor
> Fix For: 1.6
>
> Attachments: OAK-4071.patch
>
>
> Version related exception do not include offending Node path which make
> debugging such issues difficult
> {noformat}
> Caused by: javax.jcr.version.VersionException: Cannot add mixin type. Node is
> checked in.
> at
> org.apache.jackrabbit.oak.jcr.session.NodeImpl$26.checkPreconditions(NodeImpl.java:948)
> at
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:212)
> at
> org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:113)
> at
> org.apache.jackrabbit.oak.jcr.session.NodeImpl.addMixin(NodeImpl.java:943)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)