just stop being retarded and crash as you should when an error occurs

This commit is contained in:
jenz 2023-06-05 02:08:33 +02:00
parent 2d54e2b831
commit 9b371ce1ca

View File

@ -109,8 +109,14 @@ public class DiscordHandler extends ListenerAdapter {
}
}
final String contentF = content;
new RunnerClient(contentF, mentionedBot, channelName, datahandler, stanfordCoreNLP, stanfordCoreNLPSentiment,
event, username);
try {
new RunnerClient(contentF, mentionedBot, channelName, datahandler, stanfordCoreNLP, stanfordCoreNLPSentiment,
event, username);
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
//the JDA library wants to keep the program alive even when an error is happening. hopefully this just makes the program crash when an error happens.
}
}
}
}