Use multiple catch, try-with-resources, replace system.out and e.printStackTrace

This commit is contained in:
mezz committed 2017-06-27 22:57:10 -07:00
1 parent 10ca404e9e
commit 93025510ae
27 files changed
+62 -132

No files matched your search

@@ -34,6 +34,8 @@ import net.minecraftforge.event.CommandEvent;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.common.FMLLog;
import static net.minecraft.util.text.TextFormatting.*;
/**
@@ -109,7 +111,7 @@ public class ClientCommandHandler extends CommandHandler
catch (Throwable t)
{
sender.sendMessage(format(RED, "commands.generic.exception"));
t.printStackTrace();
FMLLog.log.error("Command '{}' threw an exception:", message, t);
}
return -1;