Better catch the exception where it actually occurs