mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 02:55:17 +00:00
Use multiple catch, try-with-resources, replace system.out and e.printStackTrace
This commit is contained in:
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;
|
||||
|
||||
Reference in new issue
Block a user