Class ExceptionContextPopulator

java.lang.Object
de.hybris.platform.odata2services.odata.errors.ExceptionContextPopulator
All Implemented Interfaces:
ErrorContextPopulator

public final class ExceptionContextPopulator extends Object implements ErrorContextPopulator
An ErrorContextPopulator that provides context error values for any Exceptions and is called when no more specific providers found registered in CustomODataExceptionAwareErrorCallback.
  • Constructor Details

    • ExceptionContextPopulator

      public ExceptionContextPopulator()
  • Method Details

    • populate

      public void populate(org.apache.olingo.odata2.api.processor.ODataErrorContext context)
      Description copied from interface: ErrorContextPopulator
      Populates context with values specific for the exception in the context, i.e. ODataErrorContext.getException(). At a minimum, the implementations should set HTTP status code, error code and message, etc in the ODataErrorContext depending on the exception.
      Specified by:
      populate in interface ErrorContextPopulator
      Parameters:
      context - a context to update with the exception specific values.
    • getExceptionClass

      public Class<Exception> getExceptionClass()
      Description copied from interface: ErrorContextPopulator
      Specifies what exception class this ErrorContextPopulator can provide values for.
      Specified by:
      getExceptionClass in interface ErrorContextPopulator
      Returns:
      the exception class