public class ElasticsearchExceptionTranslator extends Object implements PersistenceExceptionTranslator
PersistenceExceptionTranslator for Elasticsearch. 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.| Constructor and Description |
|---|
ElasticsearchExceptionTranslator(co.elastic.clients.json.JsonpMapper jsonpMapper) |
| Modifier and Type | Method and Description |
|---|---|
RuntimeException |
translateException(Throwable throwable)
translates an Exception if possible.
|
DataAccessException |
translateExceptionIfPossible(RuntimeException ex) |
public ElasticsearchExceptionTranslator(co.elastic.clients.json.JsonpMapper jsonpMapper)
public RuntimeException translateException(Throwable throwable)
RuntimeExceptions are wrapped in a
RuntimeExceptionthrowable - the Exception to mappublic DataAccessException translateExceptionIfPossible(RuntimeException ex)
translateExceptionIfPossible in interface PersistenceExceptionTranslatorCopyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.