Skip to content

Commit 6b277b3

Browse files
authored
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 3c835c0 commit 6b277b3

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
@@ -43,15 +43,14 @@ public NativeImageBackedTexture createIcon(ModContainer iconSource, String iconP
4343
if (e.getMessage().equals("Must be square icon")) {
4444
LOGGER.error("Mod icon must be a square for icon source {}: {}",
4545
iconSource.getMetadata().getId(),
46-
iconPath,
47-
e
46+
iconPath
4847
);
4948
}
5049

5150
return null;
5251
} catch (Throwable t) {
5352
if (!iconPath.equals("assets/" + iconSource.getMetadata().getId() + "/icon.png")) {
54-
LOGGER.error("Invalid mod icon for icon source {}: {}", iconSource.getMetadata().getId(), iconPath, t);
53+
LOGGER.error("Invalid mod icon for icon source {}: {}", iconSource.getMetadata().getId(), iconPath);
5554
}
5655
return null;
5756
}

0 commit comments

Comments
 (0)