You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2017/08/08 00:03:11 UTC

asterixdb git commit: [NO ISSUE][HYR][FAIL][RT] Avoid wrapping Errors

Repository: asterixdb
Updated Branches:
  refs/heads/master c1fbf0b48 -> 3f66d0916


[NO ISSUE][HYR][FAIL][RT] Avoid wrapping Errors

Change-Id: I7bb47c036a58ac9d8cb2dc77391a17dd22df19ad
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1922
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Yingyi Bu <bu...@gmail.com>


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

Branch: refs/heads/master
Commit: 3f66d091626370342d29e4f4c12dbf40450ffa91
Parents: c1fbf0b
Author: Michael Blow <mb...@apache.org>
Authored: Mon Aug 7 10:52:35 2017 -0400
Committer: Michael Blow <mb...@apache.org>
Committed: Mon Aug 7 17:02:48 2017 -0700

----------------------------------------------------------------------
 .../apache/hyracks/api/exceptions/HyracksDataException.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/3f66d091/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java
index 0a99ea6..2cf804e 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java
@@ -36,8 +36,10 @@ public class HyracksDataException extends HyracksException {
     public static HyracksDataException create(Throwable cause) {
         if (cause instanceof HyracksDataException || cause == null) {
             return (HyracksDataException) cause;
-        }
-        if (cause instanceof InterruptedException && !Thread.currentThread().isInterrupted()) {
+        } else if (cause instanceof Error) {
+            // don't wrap errors, allow them to propagate
+            throw (Error)cause;
+        } else if (cause instanceof InterruptedException && !Thread.currentThread().isInterrupted()) {
             LOGGER.log(Level.WARNING,
                     "Wrapping an InterruptedException in HyracksDataException and current thread is not interrupted",
                     cause);