In Java what is idiomatically most similar to raising a Python ValueError?
I would use an IllegalArgumentException
for this purpose.
The standard library defines IllegalArgumentException
:
throw new IllegalArgumentException();
I would use an IllegalArgumentException
for this purpose.
The standard library defines IllegalArgumentException
:
throw new IllegalArgumentException();