JavaFX supports the exception as in Java language. The structure is similar with try catch and finally block.
try {
var result;
result = 100 / 0;
//do something else if everything goes fine.
} catch (e: Exception) {
println("{e.getMessage()}. Actual Exception {e.getClass()}");
} finally {
println("This will be called in all situations.");
}
More on JavaFX
try {
var result;
result = 100 / 0;
//do something else if everything goes fine.
} catch (e: Exception) {
println("{e.getMessage()}. Actual Exception {e.getClass()}");
} finally {
println("This will be called in all situations.");
}
More on JavaFX
No comments:
Post a Comment