Java
Prohibited exception thrown
Warning
New
Last modified: 03 December 2024 Reports throw
statements that throw an inappropriate exception. For example an exception can be inappropriate because it is overly generic, such as java.lang.Exception
or java.io.IOException
.
Example:
void setup(Mode mode) {
if (mode == null)
throw new RuntimeException("Problem during setup"); // warning: Prohibited exception 'RuntimeException' thrown
...
}
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
ProhibitedExceptionThrown
Use the Prohibited exceptions list to specify which exceptions should be reported.
Here you can find the description of settings available for the Prohibited exception thrown inspection, and the reference of their default values.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Java, 243.23126 |
Thanks for your feedback!
Was this page helpful?