bloodshura
07/06/2017, 12:27 AMwhen
expression considered exhaustive (i.e., compiler gives me an error about missing 'else' branch)?
when (calculated) {
is Exception -> throw ToolException(calculated as Exception?)
is String -> throw ToolException(calculated as String?)
!is File -> throw ToolException("Calculated object not an instance of File?!")
}