gnodet-bot commented on code in PR #29785:
URL: https://github.com/apache/camel/pull/29785#discussion_r4561206654
##########
core/camel-support/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java:
##########
@@ -171,9 +171,13 @@ private void purgeTask() {
log.trace("Running purge task to see if any entries have been timed
out");
try {
purge();
- } catch (Exception t) {
- // must catch and log exception otherwise the executor will now
schedule next purgeTask
- log.warn("Exception occurred during purge task. This exception
will be ignored.", t);
+ } catch (VirtualMachineError t) {
+ // left as before: a JVM-level failure still ends the purge task
+ throw t;
+ } catch (Throwable t) {
+ // must catch and log exception (also an Error) otherwise the
executor will not schedule the next purgeTask,
+ // and no entry would ever time out again
+ log.warn("Exception or error occurred during purge task. This
exception will be ignored.", t);
Review Comment:
đź’¬ **Minor wording inconsistency:** The first sentence of the log message was
updated to say "Exception **or error** occurred…" but the second sentence still
reads "This **exception** will be ignored." — it should also be updated to
"This exception or error will be ignored." (or "This throwable will be
ignored.") to match the broader `catch (Throwable t)` scope.
Compare with the `emitEvent` block at line ~255 which correctly says `"This
error is ignored."`
```suggestion
log.warn("Exception or error occurred during purge task. This
exception or error will be ignored.", t);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]