From f5c42c70e5094289b2111bd7d9dfa1a34fd1b4bf Mon Sep 17 00:00:00 2001 From: Luck Date: Mon, 15 Oct 2018 22:32:52 +0100 Subject: [PATCH] Catch Throwable instead of Exception when calling context calculators Related to: lucko/ExtraContexts#4 --- .../me/lucko/luckperms/common/contexts/ContextManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/me/lucko/luckperms/common/contexts/ContextManager.java b/common/src/main/java/me/lucko/luckperms/common/contexts/ContextManager.java index e5a213abc..2f52c18a5 100644 --- a/common/src/main/java/me/lucko/luckperms/common/contexts/ContextManager.java +++ b/common/src/main/java/me/lucko/luckperms/common/contexts/ContextManager.java @@ -228,7 +228,7 @@ public abstract class ContextManager { throw new IllegalStateException(calculator.getClass() + " returned a null context set"); } accumulator = ret; - } catch (Exception e) { + } catch (Throwable e) { ContextManager.this.plugin.getLogger().warn("An exception was thrown by " + getCalculatorClass(calculator) + " whilst calculating the context of subject " + subject); e.printStackTrace(); } @@ -248,7 +248,7 @@ public abstract class ContextManager { throw new IllegalStateException(calculator.getClass() + " returned a null context set"); } accumulator = ret; - } catch (Exception e) { + } catch (Throwable e) { this.plugin.getLogger().warn("An exception was thrown by " + getCalculatorClass(calculator) + " whilst calculating static contexts"); e.printStackTrace(); }