
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

















value that identifiers an amount of money to transfer between accounts. The Transfer method could failed for many reasons, like from or to argument might be null.
all the failed possibilities, and if any of which is detected, it cannot transfer the money and should notify the caller that it failed by throwing an exception.
properly trained on the proper use of exceptions is to use catch blocks too frequently and often improperly.
expected this exception, you understand why it occurred, and you know how to deal with it. In other words, you’re defining a policy for the application.
try { //try to execute code that the programmer //knows might fail.. } catch (exception) {
}
because some object was in a bad state. If library code catches and swallows the exception, the program continues running with unpredictable results and with potential security vulnerabilities.
application to terminate.
try {
} catch (ExceptionType) {
} catch (ExceptionType) {
} finally {
}