More information in exception message for badly (?) formed ThreadKinds

This commit is contained in:
2012-06-24 21:43:49 +00:00
parent 252cd1607a
commit dc2fb9c23c

View File

@ -20,20 +20,20 @@ public enum ThreadKind {
case 0x0001: return ALLOCATED_SPACE; case 0x0001: return ALLOCATED_SPACE;
case 0x0002: return APPLE_IIGS_ICON; case 0x0002: return APPLE_IIGS_ICON;
} }
throw new IllegalArgumentException("Unknown thread_kind for message thread_class of " + threadKind); throw new IllegalArgumentException("Unknown thread_kind "+threadKind+" for message thread_class of " + threadClass);
case CONTROL: case CONTROL:
if (threadKind == 0x0000) return CREATE_DIRECTORY; if (threadKind == 0x0000) return CREATE_DIRECTORY;
throw new IllegalArgumentException("Unknown thread_kind for control thread_class of " + threadKind); throw new IllegalArgumentException("Unknown thread_kind "+threadKind+" for control thread_class of " + threadClass);
case DATA: case DATA:
switch (threadKind) { switch (threadKind) {
case 0x0000: return DATA_FORK; case 0x0000: return DATA_FORK;
case 0x0001: return DISK_IMAGE; case 0x0001: return DISK_IMAGE;
case 0x0002: return RESOURCE_FORK; case 0x0002: return RESOURCE_FORK;
} }
throw new IllegalArgumentException("Unknown thread_kind for data thread_class of " + threadKind); throw new IllegalArgumentException("Unknown thread_kind "+threadKind+" for data thread_class of " + threadClass);
case FILENAME: case FILENAME:
if (threadKind == 0x0000) return FILENAME; if (threadKind == 0x0000) return FILENAME;
throw new IllegalArgumentException("Unknown thread_kind for filename thread_class of " + threadKind); throw new IllegalArgumentException("Unknown thread_kind "+threadKind+" for filename thread_class of " + threadClass);
default: default:
throw new IllegalArgumentException("Unknown thread_class of " + threadClass); throw new IllegalArgumentException("Unknown thread_class of " + threadClass);
} }