asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Blow (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: [NO ISSUE][HYR][FAIL][RT] Avoid wrapping Errors
Date Mon, 07 Aug 2017 14:52:45 GMT
Michael Blow has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/1922

Change subject: [NO ISSUE][HYR][FAIL][RT] Avoid wrapping Errors
......................................................................

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

Change-Id: I7bb47c036a58ac9d8cb2dc77391a17dd22df19ad
---
M hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/22/1922/1

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 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);

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1922
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7bb47c036a58ac9d8cb2dc77391a17dd22df19ad
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mblow@apache.org>

Mime
View raw message