mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Improve logging in ReactiveTypeHandler
See gh-34188
This commit is contained in:
+24
-3
@@ -364,7 +364,14 @@ class ReactiveTypeHandler {
|
||||
logger.debug("Send for " + this.emitter + " failed: " + ex);
|
||||
}
|
||||
terminate();
|
||||
this.emitter.completeWithError(ex);
|
||||
try {
|
||||
this.emitter.completeWithError(ex);
|
||||
}
|
||||
catch (Exception ex2) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Failure from emitter completeWithError: " + ex2);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -377,13 +384,27 @@ class ReactiveTypeHandler {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Publisher for " + this.emitter + " failed: " + ex);
|
||||
}
|
||||
this.emitter.completeWithError(ex);
|
||||
try {
|
||||
this.emitter.completeWithError(ex);
|
||||
}
|
||||
catch (Exception ex2) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Failure from emitter completeWithError: " + ex2);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Publisher for " + this.emitter + " completed");
|
||||
}
|
||||
this.emitter.complete();
|
||||
try {
|
||||
this.emitter.complete();
|
||||
}
|
||||
catch (Exception ex2) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Failure from emitter complete: " + ex2);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user