try

try {
  ...
} catch (Exception ex) {
  ...
}
try {
  ...
} finally {
  ...
}
try {
  ...
} catch (Exception ex) {
  ...
} finally {
  ...
}

For work with resources which must be closed, see "try with resources".

viliam@bur.sk