Top Description Constructors Methods
org.glassfish.hk2.utilities

public Class RethrowErrorService

extends Object
implements ErrorService
Class Inheritance
All Implemented Interfaces
org.glassfish.hk2.api.ErrorService
Annotations
@Singleton
Imports
java.util.Objects, jakarta.inject.Singleton, org.glassfish.hk2.api.ErrorInformation, .ErrorService, .ErrorType, .MultiException

This is an implementation of ErrorService that simply rethrows the exception caught.

Do not use this service in secure applications where callers to lookup should not be given the information that they do NOT have access to a service.

Authors
jwells, David Matejcek

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
onFailure(ErrorInformation errorInformation)

Implements org.glassfish.hk2.api.ErrorService.onFailure.

This method is called when a failure occurs in the system.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

RethrowErrorServiceback to summary
public RethrowErrorService()

Method Detail

onFailureback to summary
public void onFailure(ErrorInformation errorInformation) throws MultiException

Implements org.glassfish.hk2.api.ErrorService.onFailure.

Doc from org.glassfish.hk2.api.ErrorService.onFailure.

This method is called when a failure occurs in the system. This method may use any ServiceLocator api. For example, an implementation of this method might want to remove a descriptor from the registry if the error can be determined to be a permanent failure.

Annotations
@Override
Exceptions
MultiException:
if this method throws an exception that exception will be thrown back to the caller wrapped in another MultiException if the error is of type ErrorType#FAILURE_TO_REIFY. If the error is of type ErrorType#DYNAMIC_CONFIGURATION_FAILURE or ErrorType#SERVICE_CREATION_FAILURE or ErrorType#SERVICE_DESTRUCTION_FAILURE then any exception thrown from this method is ignored and the original exception is thrown back to the caller