@@ -151,7 +151,7 @@ static Object[] unpackForeignArray(Object left, InteropLibrary lib, PForeignToPT
151
151
return data ;
152
152
}
153
153
} catch (UnsupportedMessageException | InvalidArrayIndexException e ) {
154
- throw new IllegalStateException ("object does not unpack as it claims to" );
154
+ throw new IllegalStateException ("object does not unpack to array as it claims to" );
155
155
}
156
156
return null ;
157
157
}
@@ -212,7 +212,7 @@ Object doComparisonBool(Object left, Object right,
212
212
return op .executeObject (right , lib .asBoolean (left ));
213
213
}
214
214
} catch (UnsupportedMessageException e ) {
215
- throw new IllegalStateException ("object does not unpack as it claims to" );
215
+ throw new IllegalStateException ("object does not unpack to boolean as it claims to" );
216
216
}
217
217
}
218
218
@@ -226,7 +226,7 @@ Object doComparisonLong(Object left, Object right,
226
226
return op .executeObject (right , lib .asLong (left ));
227
227
}
228
228
} catch (UnsupportedMessageException e ) {
229
- throw new IllegalStateException ("object does not unpack as it claims to" );
229
+ throw new IllegalStateException ("3object does not unpack to long as it claims to" );
230
230
}
231
231
}
232
232
@@ -240,7 +240,7 @@ Object doComparisonDouble(Object left, Object right,
240
240
return op .executeObject (right , lib .asDouble (left ));
241
241
}
242
242
} catch (UnsupportedMessageException e ) {
243
- throw new IllegalStateException ("object does not unpack as it claims to" );
243
+ throw new IllegalStateException ("object does not unpack to double as it claims to" );
244
244
}
245
245
}
246
246
@@ -254,7 +254,7 @@ Object doComparisonString(Object left, Object right,
254
254
return op .executeObject (right , lib .asString (left ));
255
255
}
256
256
} catch (UnsupportedMessageException e ) {
257
- throw new IllegalStateException ("object does not unpack as it claims to" );
257
+ throw new IllegalStateException ("object does not unpack to String as it claims to" );
258
258
}
259
259
}
260
260
@@ -322,7 +322,7 @@ static Object doForeignArray(Object left, Object right,
322
322
try {
323
323
rightInt = lib .asInt (right );
324
324
} catch (UnsupportedMessageException e ) {
325
- throw new IllegalStateException ("object does not unpack as it claims to" );
325
+ throw new IllegalStateException ("object does not unpack to index-sized int as it claims to" );
326
326
}
327
327
Object [] unpackForeignArray = unpackForeignArray (left , lib , convert );
328
328
if (unpackForeignArray != null ) {
@@ -350,7 +350,7 @@ static Object doForeignArrayForeignBoolean(Object left, Object right,
350
350
try {
351
351
return doForeignArray (left , lib .asBoolean (right ) ? 1 : 0 , raise , factory , convert , lib );
352
352
} catch (UnsupportedMessageException e ) {
353
- throw new IllegalStateException ("object does not unpack as it claims to" );
353
+ throw new IllegalStateException ("object does not unpack to boolean (to be used as index) as it claims to" );
354
354
}
355
355
}
356
356
@@ -429,7 +429,7 @@ Object doComparisonBool(Object left, Object right,
429
429
try {
430
430
return comparisonNode .executeBool (lib .asBoolean (left ), right );
431
431
} catch (UnsupportedMessageException e ) {
432
- throw new IllegalStateException ("object does not unpack as it claims to" );
432
+ throw new IllegalStateException ("object does not unpack to boolean for comparison as it claims to" );
433
433
}
434
434
}
435
435
@@ -439,7 +439,7 @@ Object doComparisonLong(Object left, Object right,
439
439
try {
440
440
return comparisonNode .executeWith (lib .asLong (left ), right );
441
441
} catch (UnsupportedMessageException e ) {
442
- throw new IllegalStateException ("object does not unpack as it claims to" );
442
+ throw new IllegalStateException ("object does not unpack to long for comparison as it claims to" );
443
443
}
444
444
}
445
445
@@ -449,7 +449,7 @@ Object doComparisonDouble(Object left, Object right,
449
449
try {
450
450
return comparisonNode .executeWith (lib .asDouble (left ), right );
451
451
} catch (UnsupportedMessageException e ) {
452
- throw new IllegalStateException ("object does not unpack as it claims to" );
452
+ throw new IllegalStateException ("object does not unpack to double for comparison as it claims to" );
453
453
}
454
454
}
455
455
@@ -462,7 +462,7 @@ Object doComparison(@SuppressWarnings("unused") Object left, Object right,
462
462
@ SuppressWarnings ("unused" )
463
463
@ Fallback
464
464
public PNotImplemented doGeneric (Object left , Object right ) {
465
- throw new IllegalStateException ( "object does not unpack as it claims to" ) ;
465
+ return PNotImplemented . NOT_IMPLEMENTED ;
466
466
}
467
467
}
468
468
0 commit comments