handle exceptions in handling thread

This commit is contained in:
bixilon 2020-06-07 00:31:02 +02:00
parent 3ca32b7e07
commit cc8cd101f0
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 6 additions and 1 deletions

View File

@ -19,6 +19,7 @@ import org.json.JSONObject;
public class ChatComponent {
JSONObject json;
//ToDo
public ChatComponent(String raw) {
try {

View File

@ -137,7 +137,11 @@ public class Connection {
while (getConnectionState() != ConnectionState.DISCONNECTED) {
while (handlingQueue.size() > 0) {
handlingQueue.get(0).log();
try {
handlingQueue.get(0).handle(getHandler());
} catch (Exception e) {
e.printStackTrace();
}
handlingQueue.remove(0);
}
Util.sleep(1);