catch all throwables in event handlers

This commit is contained in:
ThatGamerBlue
2021-06-23 19:01:33 +01:00
parent 541c8d81b5
commit 1c459084ac
2 changed files with 4 additions and 1 deletions

View File

@@ -613,6 +613,7 @@ public enum WidgetInfo
DIALOG_PLAYER_NAME(WidgetID.DIALOG_PLAYER_GROUP_ID, WidgetID.DialogPlayer.NAME), DIALOG_PLAYER_NAME(WidgetID.DIALOG_PLAYER_GROUP_ID, WidgetID.DialogPlayer.NAME),
DIALOG_PLAYER_HEAD_MODEL(WidgetID.DIALOG_PLAYER_GROUP_ID, WidgetID.DialogPlayer.HEAD_MODEL), DIALOG_PLAYER_HEAD_MODEL(WidgetID.DIALOG_PLAYER_GROUP_ID, WidgetID.DialogPlayer.HEAD_MODEL),
DIALOG_OPTION_OPTION1(WidgetID.DIALOG_OPTION_GROUP_ID, WidgetID.DialogOption.OPTIONS),
DIALOG_NOTIFICATION_TEXT(WidgetID.DIALOG_NOTIFICATION_GROUP_ID, WidgetID.DialogNotification.TEXT), DIALOG_NOTIFICATION_TEXT(WidgetID.DIALOG_NOTIFICATION_GROUP_ID, WidgetID.DialogNotification.TEXT),
DIALOG_NOTIFICATION_CONTINUE(WidgetID.DIALOG_NOTIFICATION_GROUP_ID, WidgetID.DialogNotification.CONTINUE), DIALOG_NOTIFICATION_CONTINUE(WidgetID.DIALOG_NOTIFICATION_GROUP_ID, WidgetID.DialogNotification.CONTINUE),

View File

@@ -215,8 +215,10 @@ public class EventBus
{ {
subscriber.invoke(event); subscriber.invoke(event);
} }
catch (Exception e) catch (Throwable e)
{ {
// here i'd really like to disable the bad plugin,
// but failing that i can't do much...
exceptionHandler.accept(e); exceptionHandler.accept(e);
} }
} }