Skip to content

Commit

Permalink
Revert "Recover exceptions wrapped in same class correctly"
Browse files Browse the repository at this point in the history
This reverts commit 3fb90fd
  • Loading branch information
mmedenjak committed Sep 11, 2020
1 parent fe3201c commit 9e8aeae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -709,11 +709,7 @@ private Throwable createException(Iterator<ErrorHolder> iterator) {
if (exceptionFactory == null) {
throwable = new UndefinedErrorCodeException(errorHolder.getMessage(), errorHolder.getClassName());
} else {
Throwable cause = createException(iterator);
throwable = exceptionFactory.createException(errorHolder.getMessage(), cause);
if (throwable.getCause() == null && cause != null) {
throwable.initCause(cause);
}
throwable = exceptionFactory.createException(errorHolder.getMessage(), createException(iterator));
}
throwable.setStackTrace(errorHolder.getStackTraceElements().toArray(new StackTraceElement[0]));
return throwable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import com.hazelcast.crdt.TargetNotReplicaException;
import com.hazelcast.durableexecutor.StaleTaskIdException;
import com.hazelcast.internal.cluster.impl.ConfigMismatchException;
import com.hazelcast.internal.util.ExceptionUtil;
import com.hazelcast.map.QueryResultSizeExceededException;
import com.hazelcast.map.ReachedMaxSizeException;
import com.hazelcast.memory.NativeOutOfMemoryError;
Expand Down Expand Up @@ -273,8 +272,7 @@ public static Iterable<Object[]> parameters() {
new Object[]{new IndeterminateOperationStateException(randomString())},
new Object[]{new TargetNotReplicaException(randomString())},
new Object[]{new MutationDisallowedException(randomString())},
new Object[]{new ConsistencyLostException(randomString())},
new Object[]{ExceptionUtil.tryWrapInSameClass(new NullPointerException())}
new Object[]{new ConsistencyLostException(randomString())}
);
}
}

0 comments on commit 9e8aeae

Please sign in to comment.