Throws class final
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 {...}
will be translated to:
String readFile(String name) throws IOException {...}
- Annotations
-
- @Target([AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.CONSTRUCTOR])
Constructors
Properties
-
exceptionClasses
→ Array<
KClass< Throwable> > -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited