You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polygene.apache.org by pa...@apache.org on 2017/07/17 12:46:13 UTC

[21/50] [abbrv] polygene-java git commit: Better explanation in exceptions of RDF query execution.

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/007d812c
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/007d812c
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/007d812c

Branch: refs/heads/master
Commit: 007d812ccfe84a9e290c759abe57549fed444d2f
Parents: 0dac97b
Author: niclas <ni...@hedhman.org>
Authored: Sun Jul 9 12:47:40 2017 +0800
Committer: niclas <ni...@hedhman.org>
Committed: Sun Jul 9 12:47:40 2017 +0800

----------------------------------------------------------------------
 .../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/007d812c/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 );
             }
         }