Catch Throwable instead of Exception when calling context calculators

Related to:  lucko/ExtraContexts#4
This commit is contained in:
Luck 2018-10-15 22:32:52 +01:00
parent dcc4656e5e
commit f5c42c70e5
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -228,7 +228,7 @@ public abstract class ContextManager<T> {
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<T> {
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();
}