ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shro...@apache.org
Subject [01/50] [abbrv] ignite git commit: IGNITE-2397 Returned more informative message.
Date Tue, 01 Nov 2016 02:37:20 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-2788 127f459fa -> 3ade1cb18


IGNITE-2397 Returned more informative message.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/73649cca
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/73649cca
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/73649cca

Branch: refs/heads/ignite-2788
Commit: 73649cca7cfb4ae6027bc42bb63140839b46aca9
Parents: f1d35aa
Author: Andrey Novikov <anovikov@gridgain.com>
Authored: Tue Apr 26 09:26:08 2016 +0700
Committer: shtykh_roman <rshtykh@yahoo.com>
Committed: Fri May 13 16:11:14 2016 +0900

----------------------------------------------------------------------
 .../processors/rest/handlers/query/QueryCommandHandler.java  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/73649cca/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/query/QueryCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/query/QueryCommandHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/query/QueryCommandHandler.java
index 0c44077..67e146b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/query/QueryCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/query/QueryCommandHandler.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.rest.handlers.query;
 
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
+import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
@@ -45,6 +46,7 @@ import org.apache.ignite.internal.processors.rest.handlers.GridRestCommandHandle
 import org.apache.ignite.internal.processors.rest.request.GridRestRequest;
 import org.apache.ignite.internal.processors.rest.request.RestQueryRequest;
 import org.apache.ignite.internal.util.future.GridFinishedFuture;
+import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiPredicate;
 
@@ -263,6 +265,7 @@ public class QueryCommandHandler extends GridRestCommandHandlerAdapter
{
         }
 
         /** {@inheritDoc} */
+        @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
         @Override public GridRestResponse call() throws Exception {
             final long qryId = qryIdGen.getAndIncrement();
 
@@ -346,7 +349,10 @@ public class QueryCommandHandler extends GridRestCommandHandlerAdapter
{
             catch (Exception e) {
                 removeQueryCursor(qryId, qryCurs);
 
-                return new GridRestResponse(GridRestResponse.STATUS_FAILED, e.getMessage());
+                SQLException sqlErr = X.cause(e, SQLException.class);
+
+                return new GridRestResponse(GridRestResponse.STATUS_FAILED,
+                    sqlErr != null ? sqlErr.getMessage() : e.getMessage());
             }
         }
 


Mime
View raw message