jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r219472 - in /incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/query: sql/JCRSQLQueryBuilder.java xpath/XPathQueryBuilder.java
Date Mon, 18 Jul 2005 11:55:28 GMT
Author: mreutegg
Date: Mon Jul 18 04:55:02 2005
New Revision: 219472

URL: http://svn.apache.org/viewcvs?rev=219472&view=rev
Log:
JCR-171: QueryManager.createQuery() exception handling

Modified:
    incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java
    incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java

Modified: incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java?rev=219472&r1=219471&r2=219472&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java
(original)
+++ incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java
Mon Jul 18 04:55:02 2005
@@ -117,6 +117,9 @@
             throw new InvalidQueryException(e.getMessage());
         } catch (IllegalArgumentException e) {
             throw new InvalidQueryException(e.getMessage());
+        } catch (Throwable t) {
+            // javacc parser may also throw an error in some cases
+            throw new InvalidQueryException(t.getMessage());
         }
     }
 

Modified: incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java?rev=219472&r1=219471&r2=219472&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java
(original)
+++ incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java
Mon Jul 18 04:55:02 2005
@@ -224,9 +224,9 @@
             query.XPath2().jjtAccept(this, root);
         } catch (ParseException e) {
             throw new InvalidQueryException(e.getMessage(), e);
-        } catch (Exception e) {
+        } catch (Throwable t) {
             // also catch any other exception
-            throw new InvalidQueryException(e.getMessage(), e);
+            throw new InvalidQueryException(t.getMessage(), t);
         }
         if (exceptions.size() > 0) {
             // simply report the first one



Mime
View raw message