Back to Intellij Community

NewExceptionWithoutArguments

java/java-impl/resources/inspectionDescriptions/NewExceptionWithoutArguments.html

2025.3-rc-2317 B
Original Source

Reports creation of a exception instance without any arguments specified.

When an exception is constructed without any arguments, it contains no information about the problem that occurred, which makes debugging needlessly hard.

Example:

throw new IOException(); // warning: exception without arguments