Module io.helidon.webserver
Package io.helidon.webserver.http.spi
Interface ErrorHandlerProvider<T extends Throwable>
- Type Parameters:
T- type of the exception handled by the handler
public interface ErrorHandlerProvider<T extends Throwable>
Error handler provider to create a service using
ServiceRegistry,
that provides an error handler.
Instances of this service discovered by service registry are only used when the whole server is started using it (i.e. Helidon Declarative approach).
NOTE: this API is part of preview features of Helidon. This API may still change between minor releases, but it is intended for supported external use.
To manually register an error handler, please use
HttpRouting.Builder.error(Class, io.helidon.webserver.http.ErrorHandler).
-
Method Summary
-
Method Details
-
errorType
Type of the exception to handle.- Returns:
- class of the exception
-
create
ErrorHandler<T> create()Create an error handler to handle the exception.- Returns:
- a new error handler
-