Don't use postfix increment if not necessary. Catch exception by reference.