Abort a reaction with a failed state if an exception occurs.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 28 Jan 2015 05:26:36 +0000 (06:26 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 28 Jan 2015 05:26:36 +0000 (06:26 +0100)
src/main/java/net/pterodactylus/rhynodge/engine/ReactionRunner.java

index 37bec10..ac25e18 100644 (file)
@@ -85,6 +85,7 @@ public class ReactionRunner implements Runnable {
                                        currentState = filter.filter(currentState);
                                } catch (Throwable t1) {
                                        logger.warn(format("Error during filter %s for %s.", filter.getClass().getSimpleName(), reaction.name()), t1);
+                                       return new FailedState(t1);
                                }
                        }
                }