Skip to content

Commit

Permalink
Add logger to script exec command
Browse files Browse the repository at this point in the history
  • Loading branch information
TorayLife authored and mchorse committed Mar 31, 2023
1 parent 382adda commit e506aae
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,15 @@ public void executeCommand(MinecraftServer server, ICommandSender sender, String
String fileName = e.getFileName() == null ? args[1] : e.getFileName();

e.printStackTrace();
Mappet.logger.error(e.getMessage());

throw new CommandException("script.error", fileName, e.getLineNumber(), e.getColumnNumber(), e.getMessage());
}
catch (Exception e)
{
e.printStackTrace();
Mappet.logger.error(e.getMessage());

throw new CommandException("script.empty", args[1], e.getClass().getSimpleName() + ": " + e.getMessage());
}
}
Expand Down

0 comments on commit e506aae

Please sign in to comment.