G
Guest
Hi,
Is there any way how I can shorten following code ?
try {...}
catch(FormatException) {SAME CODE IN ALL CATCH BLOCKS}
catch(OverflowException) {SAME CODE IN ALL CATCH BLOCKS}
E.g. to this ...
try {...}
catch(FormatException | OverflowException) {...}
Because I need write same code to all catch blocks ...
Thanks, B.J.
Is there any way how I can shorten following code ?
try {...}
catch(FormatException) {SAME CODE IN ALL CATCH BLOCKS}
catch(OverflowException) {SAME CODE IN ALL CATCH BLOCKS}
E.g. to this ...
try {...}
catch(FormatException | OverflowException) {...}
Because I need write same code to all catch blocks ...
Thanks, B.J.