Throws Exception instead of RuntimeException

master
Robinson 2023-08-05 19:50:36 -06:00
parent 96e70503f2
commit 56d59bd455
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ fun IntArray.toBytes(start: Int = 0, length: Int = this.size): ByteArray {
for (i in start until endPosition) {
val intValue = this[i]
if (intValue < 0 || intValue > 255) {
throw IllegalArgumentException("Int at index $i($intValue) was not a valid byte value (0-255)")
throw Exception("Int at index $i($intValue) was not a valid byte value (0-255)")
}
bytes[j++] = intValue.toByte()
}