Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 91D53200CC4 for ; Thu, 13 Jul 2017 17:14:49 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 90C3316BC0B; Thu, 13 Jul 2017 15:14:49 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BE1CF16BC18 for ; Thu, 13 Jul 2017 17:14:48 +0200 (CEST) Received: (qmail 65744 invoked by uid 500); 13 Jul 2017 15:14:48 -0000 Mailing-List: contact commits-help@polygene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@polygene.apache.org Delivered-To: mailing list commits@polygene.apache.org Received: (qmail 65663 invoked by uid 99); 13 Jul 2017 15:14:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jul 2017 15:14:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0B434F54E0; Thu, 13 Jul 2017 15:14:45 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: paulmerlin@apache.org To: commits@polygene.apache.org Date: Thu, 13 Jul 2017 15:14:51 -0000 Message-Id: <7466047bd5e04b90b7c0fbe75e1a30c4@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [07/10] polygene-java git commit: Better explanation in exceptions of RDF query execution. archived-at: Thu, 13 Jul 2017 15:14:49 -0000 Better explanation in exceptions of RDF query execution. Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/918d7b60 Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/918d7b60 Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/918d7b60 Branch: refs/heads/develop Commit: 918d7b60889330b30d40fd30b18af10841b1de75 Parents: fee3470 Author: niclas Authored: Sun Jul 9 12:47:40 2017 +0800 Committer: Paul Merlin Committed: Thu Jul 13 17:13:43 2017 +0200 ---------------------------------------------------------------------- .../polygene/index/rdf/query/TupleQueryExecutor.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/polygene-java/blob/918d7b60/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/query/TupleQueryExecutor.java ---------------------------------------------------------------------- diff --git a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/query/TupleQueryExecutor.java b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/query/TupleQueryExecutor.java index 2d80bd8..a515f74 100644 --- a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/query/TupleQueryExecutor.java +++ b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/query/TupleQueryExecutor.java @@ -90,19 +90,15 @@ public interface TupleQueryExecutor } catch( RepositoryException e ) { - throw new EntityFinderException( e ); + throw new EntityFinderException( "Exception when executing query: " + query + "\nwith bindings " + bindings, e ); } - catch( MalformedQueryException e ) + catch( QueryEvaluationException | MalformedQueryException e ) { - throw new EntityFinderException( e ); - } - catch( QueryEvaluationException e ) - { - throw new EntityFinderException( e ); + throw new EntityFinderException( "Query is invalid: " + query, e ); } catch( Exception e ) { - throw new EntityFinderException( e ); + throw new EntityFinderException( "Unexpected Exception while executing: " + query, e ); } }