Prohibited exception declared
Reports methods that declare an inappropriate exception in their throws
clause. For example an exception can be inappropriate because it is overly generic, such as java.lang.Exception
or java.lang.Throwable
.
Example:
void describeModule(String module) throws Exception {} // warning: Prohibited exception 'Exception' declared
- 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.
ProhibitedExceptionDeclared
Configure the inspection:
Use the Prohibited exceptions list to specify which exceptions should be reported.
Use the Ignore exceptions declared on methods overriding a library method option to ignore exceptions declared by methods that override a library method.
Here you can find the description of settings available for the Prohibited exception declared 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!