How to catch "illegal argument exception" in java using "finally" block?