The
finally
should have atleast a try
block, catch
is optional. The point of finally blocks is to make sure that the piece of code must be executed whether an exception is thrown or not.
Hence a finally
should always be preceded by a try
block.