Return-Path: X-Original-To: apmail-chemistry-dev-archive@www.apache.org Delivered-To: apmail-chemistry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C11F311038 for ; Tue, 24 Jun 2014 11:33:24 +0000 (UTC) Received: (qmail 18007 invoked by uid 500); 24 Jun 2014 11:33:24 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 17937 invoked by uid 500); 24 Jun 2014 11:33:24 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 17924 invoked by uid 99); 24 Jun 2014 11:33:24 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jun 2014 11:33:24 +0000 Date: Tue, 24 Jun 2014 11:33:24 +0000 (UTC) From: =?utf-8?Q?Florian_M=C3=BCller_=28JIRA=29?= To: dev@chemistry.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CMIS-816) Allow custom error handling in the AtomPub and Browser bindings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CMIS-816?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D140419= 96#comment-14041996 ]=20 Florian M=C3=BCller commented on CMIS-816: ------------------------------------- There is one-time effort of wrapping all CMIS operations. Have a look at th= e ConformanceCmisServiceWrapper. It already does that and catches and handl= es all non-CMIS exceptions. Since programming errors are binding agnostic, = this is the logical extension point to handle them. It's not necessary to replicate the HTTP status code mapping. Just let the = service wrapper throw the appropriate CMIS exception, which could be a diff= erent one or the same exception with a different error message. The framewo= rk still does the transformation into HTTP status codes. If you want a completely different status code (which is not recommend for = interoperability), don't throw a new exception, get the HTTP servlet respon= se from the call context and return whatever you want. Regarding the CSS: It only exists in the AtomPub binding implementation and= an end-user should never see this. There is also some OpenCMIS specific co= nvention in the returned HTML message. It's easy to break that if you retur= n something custom. So, better not touch it. > Allow custom error handling in the AtomPub and Browser bindings > --------------------------------------------------------------- > > Key: CMIS-816 > URL: https://issues.apache.org/jira/browse/CMIS-816 > Project: Chemistry > Issue Type: Improvement > Components: opencmis-server > Affects Versions: OpenCMIS 0.11.0 > Reporter: Carlo Sciolla > Priority: Critical > Attachments: protected-error-handling.patch > > > The AtomPub and Browser bindings servlets implement exception handling th= rough private methods which are thus not extensible by end users.=20 > This effectively inhibit fine grained control over error reporting, loggi= ng or contents of the error messages. -- This message was sent by Atlassian JIRA (v6.2#6252)