public static CapturedExceptionWrapper Capture(Exception ex) { Debug.Assert(ex is not null); if (ex is OperationCanceledException oce) { return(new CapturedExceptionWrapper(oce)); } else { return(new CapturedExceptionWrapper(ExceptionHolder.Capture(ex))); } }
private CapturedExceptionWrapper(ExceptionHolder holder) { _exception = holder; }