Unchecked exceptions in Kotlin
This inspection works only for methods annotated with com.intellij.openapi.ThrowsChecked.
The inspection tries to find cases when an annotated function is called, but the exception is not caught.
Differences from Java's checked exceptions:
This inspection produces warnings and doesn't break compilation.
By design, it's fine to suppress the exception.
The inspection should not try to prove in every case that some exception is not caught. It's supposed only to remind API users about exceptions.
Locating this inspection
- 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.
checkedExceptions- Via Settings dialog
Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.
Inspection ID: checkedExceptions
Suppressing Inspection
You can suppress this inspection by placing the following comment marker before the code fragment where you no longer want messages from this inspection to appear:
More detailed instructions as well as other ways and options that you have can be found in the product documentation:
Inspection Details | |
|---|---|
By default bundled with: |