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 14990D2B9 for ; Mon, 16 Jul 2012 15:00:50 +0000 (UTC) Received: (qmail 50383 invoked by uid 500); 16 Jul 2012 15:00:49 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 50294 invoked by uid 500); 16 Jul 2012 15:00:49 -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 50273 invoked by uid 99); 16 Jul 2012 15:00:48 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jul 2012 15:00:48 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id D4AE41402B8 for ; Mon, 16 Jul 2012 15:00:46 +0000 (UTC) Date: Mon, 16 Jul 2012 15:00:36 +0000 (UTC) From: "Thomas Mueller (JIRA)" To: oak-dev@jackrabbit.apache.org Message-ID: <728085010.58178.1342450846873.JavaMail.jiratomcat@issues-vm> In-Reply-To: <643119797.58133.1342449995527.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (OAK-189) Swallowed exceptions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OAK-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13415201#comment-13415201 ] Thomas Mueller commented on OAK-189: ------------------------------------ The reason why I think it's not acceptable is that the exception could be anything, for example out of disk space, or some internal error. Just silently returning null, without logging, makes it hard to find the root cause of the problem, because everything else might just look fine. Some code might accept null as a correct answer, so that the program just behaves somewhat differently. > Swallowed exceptions > -------------------- > > Key: OAK-189 > URL: https://issues.apache.org/jira/browse/OAK-189 > Project: Jackrabbit Oak > Issue Type: Bug > Components: jcr > Reporter: Thomas Mueller > > Exceptions should not be silently swallowed. This is currently done in SessionDelegate$SessionNameMapper, methods getOakPrefix(), getOakPrefixFromURI(), and getJcrPrefix(). Those methods catch RepositoryException, don't log by default (only when using debug level), and don't log the exception stack trace or throw an exception. > Catching a very wide band of exceptions (RepositoryException) and then simply returning null is not an acceptable solution in my view. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira