Method OnError
- Namespace
- Xunit.v3
- Assembly
- xunit.v3.core.dll
OnError(TContext, Exception)
This method is called when an exception was thrown by OnTestCollectionFinished(TContext, RunSummary). 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 OnTestCollectionFinished(TContext, RunSummary).
Returns
Remarks
This method runs during CleaningUp. It must never throw an exception.