Package org.opensearch.data.client.orhlc
Class OpenSearchExceptionTranslator
java.lang.Object
org.opensearch.data.client.orhlc.OpenSearchExceptionTranslator
- All Implemented Interfaces:
org.springframework.dao.support.PersistenceExceptionTranslator
public class OpenSearchExceptionTranslator
extends Object
implements org.springframework.dao.support.PersistenceExceptionTranslator
Simple
PersistenceExceptionTranslator for OpenSearch. Convert the given runtime exception to an
appropriate exception from the org.springframework.dao hierarchy. Return null if no translation is
appropriate: any other exception may have resulted from user code, and should not be translated.- Since:
- 0.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontranslateException(Throwable throwable) translates an Exception if possible.org.springframework.dao.DataAccessException
-
Constructor Details
-
OpenSearchExceptionTranslator
public OpenSearchExceptionTranslator()
-
-
Method Details
-
translateException
translates an Exception if possible. Exceptions that are noRuntimeExceptions are wrapped in a RuntimeException- Parameters:
throwable- the Exception to map- Returns:
- the potentially translated RuntimeException.
-
translateExceptionIfPossible
public org.springframework.dao.DataAccessException translateExceptionIfPossible(RuntimeException ex) - Specified by:
translateExceptionIfPossiblein interfaceorg.springframework.dao.support.PersistenceExceptionTranslator
-