public void Execute(CaseExecution caseExecution, object instance) { try { outer(caseExecution, instance, () => inner.Execute(caseExecution, instance)); } catch (Exception exception) { caseExecution.Fail(exception); } }
public void Execute(Case @case, object instance) { try { outer(@case, instance, () => inner.Execute(@case, instance)); } catch (PreservedException preservedException) { @case.Exceptions.Add(preservedException.OriginalException); } catch (Exception exception) { @case.Exceptions.Add(exception); } }