From 7f1130d6d5da48b5a2da55c33af4ab603b5b9c29 Mon Sep 17 00:00:00 2001 From: Gustav Karlsson Date: Tue, 23 Jul 2024 23:37:52 +0200 Subject: [PATCH] Do not stop let scheduler-listener notification throw Error --- .../github/kagkarlsson/scheduler/event/SchedulerListeners.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db-scheduler/src/main/java/com/github/kagkarlsson/scheduler/event/SchedulerListeners.java b/db-scheduler/src/main/java/com/github/kagkarlsson/scheduler/event/SchedulerListeners.java index c104d5d2..45df8c1c 100644 --- a/db-scheduler/src/main/java/com/github/kagkarlsson/scheduler/event/SchedulerListeners.java +++ b/db-scheduler/src/main/java/com/github/kagkarlsson/scheduler/event/SchedulerListeners.java @@ -107,7 +107,7 @@ public void onCandidateEvent(CandidateEventType type) { public void fireAndLogErrors(SchedulerListener listener, String method, Runnable r) { try { r.run(); - } catch (RuntimeException e) { + } catch (Throwable e) { LOG.warn( "Listener '{}' method '{}' threw an unexpected Exception", listener.getClass().getName(),