Increase recursion limit when catching exception