abdullah alamoudi has posted comments on this change. Change subject: [ASTERIXDB-2204][STO] Fix implementations and usages of IIndexCursor ......................................................................
Patch Set 17: (1 comment) https://asterix-gerrit.ics.uci.edu/#/c/2324/17/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java File hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java: PS17, Line 43: public static void throwIfNotNull(Throwable cause) throws HyracksDataException { : if (cause == null) { : return; : } : if (cause instanceof HyracksDataException) { : throw (HyracksDataException) cause; : } : if (cause instanceof InterruptedException) { : Thread.currentThread().interrupt(); : } : if (cause instanceof RuntimeException) { // Unchecked : throw (RuntimeException) cause; : } : if (cause instanceof Error) { : throw (Error) cause; : } : throw new HyracksDataException(cause); : } > What is the motivation of hiding the throw in this method? This makes it i The motivation is: 1. Not Wrapping Errors 2. Not Wrapping RuntimeExceptions. 3. Maintaining Interrupts. 4. Having this code in one place. As for the suppress below, it was moved to ExceptionUtils and we agreed that the suppressions will be in the order of being thrown and that we will not immediately throw in case of Error -- To view, visit https://asterix-gerrit.ics.uci.edu/2324 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I98a7a8b931eb24dbe11bf2bdc61b754ca28ebdf9 Gerrit-PatchSet: 17 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: abdullah alamoudi <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Luo Chen <[email protected]> Gerrit-Reviewer: Michael Blow <[email protected]> Gerrit-Reviewer: Murtadha Hubail <[email protected]> Gerrit-Reviewer: Taewoo Kim <[email protected]> Gerrit-Reviewer: Taewoo Kim <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]> Gerrit-Reviewer: abdullah alamoudi <[email protected]> Gerrit-HasComments: Yes
