Maybe an `IllegalArgumentException` would be more appropriate?