Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EB70796CD for ; Wed, 9 May 2012 10:56:16 +0000 (UTC) Received: (qmail 27008 invoked by uid 500); 9 May 2012 10:56:16 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 26962 invoked by uid 500); 9 May 2012 10:56:16 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 26952 invoked by uid 99); 9 May 2012 10:56:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 May 2012 10:56:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 May 2012 10:56:15 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 106FA43BE39 for ; Wed, 9 May 2012 10:55:54 +0000 (UTC) Date: Wed, 9 May 2012 10:55:53 +0000 (UTC) From: "Jukka Zitting (JIRA)" To: oak-dev@jackrabbit.apache.org Message-ID: <1137976020.43609.1336560954156.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <648242261.35709.1336415808522.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (OAK-89) Improve exception handling MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OAK-89?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:all-tabpanel ] Jukka Zitting updated OAK-89: ----------------------------- Attachment: OAK-89.patch See the attached patch. It's close to half the size of the earlier patches = and correctly handles throwing {{PathNotFound}}-, {{ValueFormat}}- and {{Re= positoryExceptions}} where appropriate or simply returning {{false}} where = an exception is not needed. Note especially the {{SessionDelegate.getOakPathOr...}} methods that encode= some of the different outcomes of a failed name or path mapping. A breakdown of the patch is also available at https://github.com/jukka/jack= rabbit-oak/compare/trunk...OAK-89 bq. ... nullability annotations ... Sounds like a good idea to me. =20 > Improve exception handling > -------------------------- > > Key: OAK-89 > URL: https://issues.apache.org/jira/browse/OAK-89 > Project: Jackrabbit Oak > Issue Type: Improvement > Components: core, jcr > Affects Versions: 0.2.1 > Reporter: Michael D=C3=BCrig > Attachments: OAK-89-2.patch, OAK-89.patch, OAK-89.patch > > > As discusses on the @oak-dev list [1] we need to improve the way exceptio= ns are thrown and handled.=20 > I suggest to create a OakException which extends from RuntimeException an= d encapsulate a RepositoryException into it. These exceptions can then be h= andled where appropriate. We can the later turn this into a more sophistica= ted mechanism where the OakException is mapped to a corresponding Repositor= yException by an injected mapping (see Jukka's proposal in the discussion). > [1] http://markmail.org/message/t5czrpkvyamn7sym -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira