exiting 1 if we catch an exception