TestExecutionExceptionHandler
defines the API for Extensions
that wish to handle exceptions thrown during test execution.
In this context, test execution refers to the physical
invocation of a @Test
method and not to any test-level extensions
or callbacks.
Common use cases include swallowing an exception if it's anticipated or rolling back a transaction in certain error scenarios.
Consult the documentation in Extension
for details on
constructor requirements.
LifecycleMethodExecutionExceptionHandler
Modifier and Type | Method and Description |
---|---|
public void | handleTestExecutionException(ExtensionContext
the current extension context; never context, Throwable null the throwable)Throwable to handle; never null Handle the supplied |
handleTestExecutionException | back to summary |
---|---|
public void handleTestExecutionException(ExtensionContext context, Throwable throwable) throws Throwable Handle the supplied Implementors must perform one of the following.
If the supplied Note that the
|