isThrown

open fun isThrown(clazz: Class<out Throwable>): Boolean(source)

Check whether this elements throws this exception class. Note that this is simply a text compare of the simple name of the class, no actual type resolution takes place.

Return

true if found in throws clause, false if not

Parameters

clazz

the class of the exception


open fun isThrown(throwableName: String): Boolean(source)

Check whether this elements throws this exception class Note that this is simply a text compare, no actual type resolution takes place.

Return

true if found in throws clause, false if not

Parameters

throwableName

the class of the exception