KT.THROWING_EXCEPTION_IN_MAIN
Exception thrown in a main method
This rule reports all exceptions that are thrown in a main method. An exception should only be thrown if it can be handled by a higher function.
Noncompliant Code
Copy
fun main(args: Array<String>) {
// ...
throw IOException() // exception should not be thrown here
}