Log warning message and rethrow exceptions from events. (#1207)
Closes #1206.
This commit is contained in:
@@ -182,7 +182,8 @@ class CouchbaseTemplateSupport implements ApplicationContextAware, TemplateSuppo
|
||||
try {
|
||||
this.applicationContext.publishEvent(event);
|
||||
} catch (Exception e) {
|
||||
LOG.error("exception emitting event "+event, e);
|
||||
LOG.warn("{} thrown during {}", e, event);
|
||||
throw e;
|
||||
}
|
||||
} else {
|
||||
LOG.info("maybeEmitEvent called, but CouchbaseTemplate not initialized with applicationContext");
|
||||
|
||||
@@ -189,7 +189,8 @@ class ReactiveCouchbaseTemplateSupport implements ApplicationContextAware, React
|
||||
try {
|
||||
this.applicationContext.publishEvent(event);
|
||||
} catch (Exception e) {
|
||||
LOG.error("exception emitting event "+event, e);
|
||||
LOG.warn("{} thrown during {}", e, event);
|
||||
throw e;
|
||||
}
|
||||
} else {
|
||||
LOG.info("maybeEmitEvent called, but ReactiveCouchbaseTemplate not initialized with applicationContext");
|
||||
|
||||
Reference in New Issue
Block a user