-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
22, 23, 24
-
None
The out of bounds exception messages for MemorySegments can be improved. Rather than:
Exception java.lang.IndexOutOfBoundsException: Out of bound access on segment MemorySegment{ heapBase: [B@4ccabbaa, address: 0x0, byteSize: 2 }; new offset = 2; new length = 1
we could use:
Exception java.lang.IndexOutOfBoundsException: Out of bound access on segment MemorySegment{ heapBase: [B@4ccabbaa, address: 0x0, byteSize: 2 }; attempting to access an element of length 1 at offset 2 which is outside the valid range 0 <= offset+length < byteSize (=2)
Exception java.lang.IndexOutOfBoundsException: Out of bound access on segment MemorySegment{ heapBase: [B@4ccabbaa, address: 0x0, byteSize: 2 }; new offset = 2; new length = 1
we could use:
Exception java.lang.IndexOutOfBoundsException: Out of bound access on segment MemorySegment{ heapBase: [B@4ccabbaa, address: 0x0, byteSize: 2 }; attempting to access an element of length 1 at offset 2 which is outside the valid range 0 <= offset+length < byteSize (=2)