Method OnError
- Namespace
- Xunit.v3
- Assembly
- xunit.v3.core.dll
OnError(TContext, Exception)
This method is called when an exception was thrown by OnTestFinished(TContext, decimal, string, string[]?, IReadOnlyDictionary<string, TestAttachment>?). By default, this sends ErrorMessage.
protected virtual ValueTask<bool> OnError(TContext ctxt, Exception exception)
Parameters
ctxtTContextThe context that describes the current test class
exceptionExceptionThe exception that was thrown by OnTestFinished(TContext, decimal, string, string[]?, IReadOnlyDictionary<string, TestAttachment>?).
Returns
Remarks
This method runs during CleaningUp. It must never throw an exception.