Class ExceptionContextFactory<C>
java.lang.Object
org.incendo.cloud.exception.handling.ExceptionContextFactory<C>
-
Constructor Summary
ConstructorsConstructorDescriptionExceptionContextFactory(@NonNull ExceptionController<C> controller) Creates a new factory. -
Method Summary
Modifier and TypeMethodDescription<T extends Throwable>
@NonNull ExceptionContext<C, T> createContext(@NonNull CommandContext<C> context, @NonNull T exception) Creates a new exception context.
-
Constructor Details
-
ExceptionContextFactory
Creates a new factory.- Parameters:
controller- the controller
-
-
Method Details
-
createContext
public <T extends Throwable> @NonNull ExceptionContext<C,T> createContext(@NonNull CommandContext<C> context, @NonNull T exception) Creates a new exception context.- Type Parameters:
T- the exception type- Parameters:
context- the command contextexception- the exception- Returns:
- the created context
-