|
15 | 15 | A SIMPLE-VECTOR specialized on 8, 16, 32, and 64 unsigned byte |
16 | 16 | types backed by a java.nio.Buffer implmentation. |
17 | 17 |
|
| 18 | +
|
18 | 19 | */ |
| 20 | +// Only code paths for (UNSIGNED-BYTE 8) types right now. |
19 | 21 | public final class BasicVectorBuffer |
20 | 22 | extends BasicVector |
21 | 23 | { |
@@ -83,7 +85,7 @@ public LispObject AREF(int i) { |
83 | 85 | case U64: |
84 | 86 | return LispInteger.getUnsignedInstance(((LongBuffer)data).get(i)); |
85 | 87 | } |
86 | | - return program_error("Bad ELT in BasicVectorBuffer."); |
| 88 | + return program_error("Bad array reference in BasicVectorBuffer for " + i); |
87 | 89 | } catch (ArrayIndexOutOfBoundsException e) { |
88 | 90 | return badIndex(i, capacity); |
89 | 91 | } |
@@ -152,8 +154,10 @@ public LispObject subseq(int start, int end) { |
152 | 154 | return result; |
153 | 155 | } catch (ArrayIndexOutOfBoundsException e) { |
154 | 156 | String m |
155 | | - = MessageFormat.format("The bounding indices {0} and {1} are bad for a sequence of length {2}.", start, end, length()); |
156 | | - return type_error(m, new JavaObject(e), NIL); // Not really a type_error, as there is not one type |
| 157 | + = MessageFormat.format("The bounding indices {0} and {1} are bad for a sequence of length {2}.", |
| 158 | + start, end, length()); |
| 159 | + // Not really a type_error, as there is not one type |
| 160 | + return type_error(m, new JavaObject(e), NIL); |
157 | 161 | } |
158 | 162 | } |
159 | 163 |
|
|
0 commit comments