本文整理了Java中reactor.core.publisher.Operators.onErrorDropped()
方法的一些代码示例,展示了Operators.onErrorDropped()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Operators.onErrorDropped()
方法的具体详情如下:
包路径:reactor.core.publisher.Operators
类名称:Operators
方法名:onErrorDropped
[英]An unexpected exception is about to be dropped.
If no hook is registered for Hooks#onErrorDropped(Consumer), the dropped error is logged at ERROR level and thrown (via Exceptions#bubble(Throwable).
[中]一个意外的异常即将被删除。
如果没有为Hooks#onerrordroped(Consumer)注册任何钩子,则在错误级别记录并抛出丢弃的错误(通过异常#bubble(Throwable))。
代码示例来源:origin: reactor/reactor-core
@Override
public void onError(Throwable t) {
if (done) {
Operators.onErrorDropped(t, ctx);
return;
}
error = t;
done = true;
drain();
}
代码示例来源:origin: reactor/reactor-core
void cleanup(S s) {
try {
state = null;
stateConsumer.accept(s);
} catch (Throwable e) {
Operators.onErrorDropped(e, actual.currentContext());
}
}
代码示例来源:origin: reactor/reactor-core
@Override
public void onError(Throwable t) {
if (done) {
Operators.onErrorDropped(t, this.ctx);
return;
}
done = true;
cleanupCallback.accept(collection);
actual.onError(t);
}
代码示例来源:origin: reactor/reactor-core
@Override
public void onError(Throwable t) {
if (done) {
Operators.onErrorDropped(t, this.ctx);
return;
}
done = true;
actual.onError(t);
}
代码示例来源:origin: resilience4j/resilience4j
private void safeHookFinally(SignalType type) {
try {
hookFinally(type);
}
catch (Throwable finallyFailure) {
Operators.onErrorDropped(finallyFailure, currentContext());
}
}
代码示例来源:origin: reactor/reactor-core
@Override
public void onError(Throwable t) {
if (done) {
Operators.onErrorDropped(t, actual.currentContext());
return;
}
error = t;
done = true;
trySchedule(null, t, null);
}
代码示例来源:origin: reactor/reactor-core
@Override
public void onError(Throwable t) {
if (done) {
Operators.onErrorDropped(t, this.ctx);
return;
}
done = true;
actual.onError(t);
Operators.onDiscardMultiple(buffer, this.ctx);
}
代码示例来源:origin: reactor/reactor-core
@Override
public void onError(Throwable throwable) {
if (resourceProvided) {
Operators.onErrorDropped(throwable, actual.currentContext());
return;
}
//even if no resource provided, actual.onSubscribe has been called
//let's immediately fail actual
actual.onError(throwable);
}
代码示例来源:origin: reactor/reactor-core
@Override
public void onError(Throwable t) {
if (done) {
Operators.onErrorDropped(t, actual.currentContext());
return;
}
done = true;
actual.onError(t);
}
代码示例来源:origin: reactor/reactor-core
@Override
public void onError(Throwable t) {
if (Exceptions.addThrowable(ERROR, this, t)) {
done = true;
drain();
}
else {
Operators.onErrorDropped(t, this.ctx);
}
}
代码示例来源:origin: reactor/reactor-core
@Override
public void onError(Throwable t) {
if (!done) {
done = true;
parent.innerError(t);
} else {
Operators.onErrorDropped(t, parent.currentContext());
}
}
代码示例来源:origin: reactor/reactor-core
@Override
public void onError(Throwable t) {
if (done) {
Operators.onErrorDropped(t, actual.currentContext());
return;
}
done = true;
actual.onError(t);
}
代码示例来源:origin: reactor/reactor-core
@Override
public void onError(Throwable t) {
if (done) {
Operators.onErrorDropped(t, actual.currentContext());
return;
}
done = true;
actual.onError(t);
}
代码示例来源:origin: reactor/reactor-core
void innerError(Throwable e) {
if (Exceptions.addThrowable(ERROR, this, e)) {
done = true;
drain();
}
else {
discardQueue(queue);
Operators.onErrorDropped(e, this.ctx);
}
}
代码示例来源:origin: reactor/reactor-core
@Override
public void innerCloseError(Throwable ex) {
if (Exceptions.addThrowable(ERROR, this, ex)) {
drain();
}
else {
Operators.onErrorDropped(ex, actual.currentContext());
}
}
}
代码示例来源:origin: reactor/reactor-core
@Override
public void onError(Throwable t) {
if (done) {
Operators.onErrorDropped(t, actual.currentContext());
return;
}
done = true;
Operators.onDiscard(value, actual.currentContext());
value = null;
actual.onError(t);
}
代码示例来源:origin: reactor/reactor-core
@Override
public void onError(Throwable t) {
if (subscription != Operators.cancelledSubscription()) {
SUBSCRIPTION.lazySet(this, Operators.cancelledSubscription());
parent.boundaryError(this, t);
}
else {
Operators.onErrorDropped(t, parent.ctx);
}
}
代码示例来源:origin: reactor/reactor-core
@Override
public void innerError(Throwable ex) {
if (Exceptions.addThrowable(ERROR, this, ex)) {
ACTIVE.decrementAndGet(this);
drain();
}
else {
Operators.onErrorDropped(ex, actual.currentContext());
}
}
代码示例来源:origin: reactor/reactor-core
void innerError(MergeSequentialInner<R> inner, Throwable e) {
if (Exceptions.addThrowable(ERROR, this, e)) {
inner.setDone();
if (errorMode != ErrorMode.END) {
s.cancel();
}
drain();
}
else {
Operators.onErrorDropped(e, actual.currentContext());
}
}
代码示例来源:origin: reactor/reactor-core
boolean failOverflow(R v, Subscription toCancel){
Throwable e = Operators.onOperatorError(toCancel,
Exceptions.failWithOverflow(Exceptions.BACKPRESSURE_ERROR_QUEUE_FULL),
v, actual.currentContext());
if (!Exceptions.addThrowable(ERROR, this, e)) {
Operators.onErrorDropped(e, actual.currentContext());
return false;
}
return true;
}
内容来源于网络,如有侵权,请联系作者删除!