Avoid evaluating exception value twice