polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [07/10] polygene-java git commit: Better explanation in exceptions of RDF query execution.
Date Thu, 13 Jul 2017 15:14:51 GMT
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 <niclas@hedhman.org>
Authored: Sun Jul 9 12:47:40 2017 +0800
Committer: Paul Merlin <paulmerlin@apache.org>
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 );
             }
         }
 


Mime
View raw message