Use code from caught exception, if available