public class MCSExceptionProvider extends Object
| Constructor and Description |
|---|
MCSExceptionProvider() |
| Modifier and Type | Method and Description |
|---|---|
static eu.europeana.cloud.service.mcs.exception.MCSException |
generateException(eu.europeana.cloud.common.response.ErrorInfo errorInfo)
Generate
MCSException from ErrorInfo. |
public static eu.europeana.cloud.service.mcs.exception.MCSException generateException(eu.europeana.cloud.common.response.ErrorInfo errorInfo)
MCSException from ErrorInfo.
This method is intended to be used everywhere where we want to translate MCS error message to appropriate
exception and throw it. Error message handling occurs in different methods so we avoid code repetition.
Method returns the child classes of MCSException. It should not return general MCSException, unless new
error code was introduced in McsErrorCode Method can throw DriverException if MCS responded with HTTP 500
code (InternalServerError).errorInfo - object storing error information returned by MCSCopyright © 2013–2017 Europeana Cloud Development Team. All rights reserved.