Fix wrong error message for ArithmeticException

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

Branch: refs/heads/master
Commit: af15062543b93c8146ae75bbb90f971e86a6bf96
Parents: 15dd1c1
Author: nichunen <chunen...@kyligence.io>
Authored: Mon Dec 11 11:07:34 2017 +0800
Committer: Ni Chunen <chunen...@kyligence.io>
Committed: Tue Dec 12 12:57:18 2017 +0800

----------------------------------------------------------------------
 query/src/main/java/org/apache/kylin/query/util/QueryUtil.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/af150625/query/src/main/java/org/apache/kylin/query/util/QueryUtil.java
----------------------------------------------------------------------
diff --git a/query/src/main/java/org/apache/kylin/query/util/QueryUtil.java 
b/query/src/main/java/org/apache/kylin/query/util/QueryUtil.java
index 3d21818..24d0c06 100644
--- a/query/src/main/java/org/apache/kylin/query/util/QueryUtil.java
+++ b/query/src/main/java/org/apache/kylin/query/util/QueryUtil.java
@@ -104,6 +104,11 @@ public class QueryUtil {
                 msg = cause.getMessage();
                 break;
             }
+
+            if (cause.getClass().getName().contains("ArithmeticException")) {
+                msg = "ArithmeticException: " + cause.getMessage();
+                break;
+            }
             cause = cause.getCause();
         }
 

Reply via email to