I saw some code like this:
try
{
db.store(mydata);
}
finally
{
db.cleanup();
}
I thought try
It's there because the programmer wanted to make sure that db.cleanup() is called even if the code inside the try block throws an exception. Any exceptions will not be handled by that block, but they'll only be propagated upwards after the finally block is executed. The finally block will also be executed if there was no exception.