Throws
This annotation indicates what exceptions should be declared by a function when compiled to a JVM method.
Example:
@Throws(IOException::class)
fun readFile(name: String): String {...}
Content copied to clipboard
will be translated to
String readFile(String name) throws IOException {...}
Content copied to clipboard