Tuesday, August 18, 2009

JavaFX Script Exceptions

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

No comments:

Post a Comment