Skip to content

Commit 7dede9e

Browse files
ricksouthProspector
authored andcommitted
Remove redundant stack trace printing for icon errors (#833)
I'm often in the situation where I'm developing a new mod that doesn't have an icon yet. I use Mod Menu to access my config file, and it prints a large stack trace twice. Once when entering, and once when exiting. Since there is already a complete error line in red, which is acceptable to be shown I think, there is no need for a multi-line stack trace after that. I've removed it for the square icon error as well, since that feels redundant too. But I can re-add that, let me know. Thanks for the great mod! - Removed redundant stacetrace logging for mod icon errors
1 parent 02572d8 commit 7dede9e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/main/java/com/terraformersmc/modmenu/util/mod/fabric/FabricIconHandler.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,14 @@ public NativeImageBackedTexture createIcon(ModContainer iconSource, String iconP
4646
if (e.getMessage().equals("Must be square icon")) {
4747
LOGGER.error("Mod icon must be a square for icon source {}: {}",
4848
iconSource.getMetadata().getId(),
49-
iconPath,
50-
e
49+
iconPath
5150
);
5251
}
5352

5453
return null;
5554
} catch (Throwable t) {
5655
if (!iconPath.equals("assets/" + iconSource.getMetadata().getId() + "/icon.png")) {
57-
LOGGER.error("Invalid mod icon for icon source {}: {}", iconSource.getMetadata().getId(), iconPath, t);
56+
LOGGER.error("Invalid mod icon for icon source {}: {}", iconSource.getMetadata().getId(), iconPath);
5857
}
5958
return null;
6059
}

0 commit comments

Comments
 (0)