Michael Blow has submitted this change and it was merged.

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


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

Change-Id: I7bb47c036a58ac9d8cb2dc77391a17dd22df19ad
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1922
Sonar-Qube: Jenkins <[email protected]>
Integration-Tests: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Contrib: Jenkins <[email protected]>
Reviewed-by: Yingyi Bu <[email protected]>
---
M 
hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Yingyi Bu: Looks good to me, approved
  Jenkins: Verified; No violations found; No violations found; Verified

Objections:
  Anon. E. Moose #1000171: Violations found



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: merged
Gerrit-Change-Id: I7bb47c036a58ac9d8cb2dc77391a17dd22df19ad
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Michael Blow <[email protected]>
Gerrit-Reviewer: Till Westmann <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>

Reply via email to