Skip to content

Commit a09e070

Browse files
committed
Use CompilerDirectives.shouldNotReachHere
1 parent 9a7e4f3 commit a09e070

File tree

1 file changed

+1
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/ints

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/ints/IntBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ private Object makeInt(BigDecimal d) {
246246
return factory().createInt(d.toBigIntegerExact());
247247
} catch (ArithmeticException e) {
248248
// has non-zero fractional part, which should not happen
249-
throw new IllegalStateException();
249+
throw CompilerDirectives.shouldNotReachHere("non-integer produced after rounding an integer", e);
250250
}
251251
}
252252

0 commit comments

Comments
 (0)