Skip to content

Commit ebe91cd

Browse files
committed
Improve error message when propertyIndex is out of range for entries
1 parent 66c4fbc commit ebe91cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

msg/src/main/java/io/github/jmcleodfoss/msg/NamedProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ java.util.List<EntryStreamEntryData> getEntryStreamEntries(EntryStreamEntry.Prop
103103
String getPropertyName(int propertyIndex)
104104
{
105105
if (propertyIndex >= entries.length)
106-
return String.format("Out of bounds error (%d >= %d", propertyIndex, entries.length);
106+
return String.format("Out of bounds error [entries] (%d >= %d)", propertyIndex, entries.length);
107107

108108
if (entries[propertyIndex].propertyType == EntryStreamEntry.PropertyType.STRING_NAMED_PROPERTY)
109109
return stringsByOffset.get(entries[propertyIndex].nameIdentifierOrStringOffset);

0 commit comments

Comments
 (0)