log format errors as error level and pass exception directly

This commit is contained in:
Eldrinn-Elantey committed 2026-05-19 10:18:39 +04:00
1 parent aaccad95a9
commit cd00ee048d
1 file changed
+1 -1
@@ -24,7 +24,7 @@ public abstract class ItemStackMixin {
return item.getItemStackDisplayName(stack);
} catch (Exception e) {
String unlocalizedName = item.getUnlocalizedName(stack);
LOGGER.warn("Format error in display name for item '{}': {}", unlocalizedName, e.getMessage());
LOGGER.error("Format error in display name for item '{}'", unlocalizedName, e);
return unlocalizedName + " [FORMAT ERROR]";
}
}