@Override @Nullable public R poll() { for(;;) { T v = s.poll(); if (v != null) { try { return Objects.requireNonNull(mapper.apply(v)); } catch (Throwable t) { RuntimeException e_ = Operators.onNextPollError(v, t, currentContext()); if (e_ != null) { throw e_; } else { continue; } } } return null; } }
@Override @Nullable public R poll() { for(;;) { T v = s.poll(); if (v != null) { try { return Objects.requireNonNull(mapper.apply(v)); } catch (Throwable t) { RuntimeException e_ = Operators.onNextPollError(v, t, currentContext()); if (e_ != null) { throw e_; } else { continue; } } } return null; } }
RuntimeException e_ = Operators.onNextPollError(v, e, this.ctx); Operators.onDiscard(v, this.ctx); if (e_ != null) { RuntimeException e_ = Operators.onNextPollError(v, e, this.ctx); Operators.onDiscard(v, this.ctx); if (e_ != null) {
RuntimeException e_ = Operators.onNextPollError(v, e, currentContext()); Operators.onDiscard(v, this.ctx); if (e_ != null) { RuntimeException e_ = Operators.onNextPollError(v, e, currentContext()); Operators.onDiscard(v, this.ctx); if (e_ != null) {
@Test public void pollErrorModeLocalStrategy() { List<Object> nextDropped = new ArrayList<>(); List<Object> errorDropped = new ArrayList<>(); Hooks.onNextDropped(nextDropped::add); Hooks.onErrorDropped(errorDropped::add); Context c = Context.of(OnNextFailureStrategy.KEY_ON_NEXT_ERROR_STRATEGY, OnNextFailureStrategy.RESUME_DROP); Exception error = new IllegalStateException("boom"); try { assertThat(Hooks.onNextErrorHook).as("no global hook").isNull(); RuntimeException e = Operators.onNextPollError("foo", error, c); assertThat(e).isNull(); assertThat(nextDropped).containsExactly("foo"); assertThat(errorDropped).containsExactly(error); } finally { Hooks.resetOnNextDropped(); Hooks.resetOnErrorDropped(); } }
Throwable e_ = Operators.onNextPollError(v, error, actual.currentContext()); if (e_ != null) { throw Exceptions.propagate(e_); if (stop) { if (error != null) { Throwable e_ = Operators.onNextPollError(v, error, actual.currentContext()); if (e_ != null) { done = true; //set done because we throw or go through `actual` directly Throwable e_ = Operators.onNextPollError(v, error, actual.currentContext()); if (e_ != null) { throw Exceptions.propagate(e_); if (stop) { if (error != null) { Throwable e_ = Operators.onNextPollError(v, error, actual.currentContext()); if (e_ != null) { done = true; //set done because we throw or go through `actual` directly
Context ctx = actual.currentContext(); Throwable e_ = Operators.onNextPollError(t, e, ctx); if (e_ == null) { return;
Throwable e_ = Operators.onNextPollError(v, error, actual.currentContext()); if (e_ != null) { throw Exceptions.propagate(e_); Throwable e_ = Operators.onNextPollError(v, error, actual.currentContext()); if (e_ != null) { throw Exceptions.propagate(e_); done = true; //set done because we throw or go through `actual` directly if (error != null) { Throwable e_ = Operators.onNextPollError(v, error, actual.currentContext()); if (e_ != null) { throw Exceptions.propagate(e_);
Throwable e_ = Operators.onNextPollError(v, e, this.ctx); if (e_ == null) {
@Override @Nullable public R poll() { for(;;) { T v = s.poll(); if (v != null) { try { return Objects.requireNonNull(mapper.apply(v)); } catch (Throwable t) { RuntimeException e_ = Operators.onNextPollError(v, t, currentContext()); if (e_ != null) { throw e_; } else { continue; } } } return null; } }
@Override @Nullable public R poll() { for(;;) { T v = s.poll(); if (v != null) { try { return Objects.requireNonNull(mapper.apply(v)); } catch (Throwable t) { RuntimeException e_ = Operators.onNextPollError(v, t, currentContext()); if (e_ != null) { throw e_; } else { continue; } } } return null; } }
RuntimeException e_ = Operators.onNextPollError(v, e, this.ctx); Operators.onDiscard(v, this.ctx); if (e_ != null) { RuntimeException e_ = Operators.onNextPollError(v, e, this.ctx); Operators.onDiscard(v, this.ctx); if (e_ != null) {
RuntimeException e_ = Operators.onNextPollError(v, e, currentContext()); Operators.onDiscard(v, this.ctx); if (e_ != null) { RuntimeException e_ = Operators.onNextPollError(v, e, currentContext()); Operators.onDiscard(v, this.ctx); if (e_ != null) {
Throwable e_ = Operators.onNextPollError(v, error, actual.currentContext()); if (e_ != null) { throw Exceptions.propagate(e_); if (stop) { if (error != null) { Throwable e_ = Operators.onNextPollError(v, error, actual.currentContext()); if (e_ != null) { done = true; //set done because we throw or go through `actual` directly Throwable e_ = Operators.onNextPollError(v, error, actual.currentContext()); if (e_ != null) { throw Exceptions.propagate(e_); if (stop) { if (error != null) { Throwable e_ = Operators.onNextPollError(v, error, actual.currentContext()); if (e_ != null) { done = true; //set done because we throw or go through `actual` directly
Throwable e_ = Operators.onNextPollError(v, error, actual.currentContext()); if (e_ != null) { throw Exceptions.propagate(e_); Throwable e_ = Operators.onNextPollError(v, error, actual.currentContext()); if (e_ != null) { throw Exceptions.propagate(e_); done = true; //set done because we throw or go through `actual` directly if (error != null) { Throwable e_ = Operators.onNextPollError(v, error, actual.currentContext()); if (e_ != null) { throw Exceptions.propagate(e_);
Context ctx = actual.currentContext(); Throwable e_ = Operators.onNextPollError(t, e, ctx); if (e_ == null) { return;
Throwable e_ = Operators.onNextPollError(v, e, this.ctx); if (e_ == null) {