Class MongoExceptionTranslator
java.lang.Object
org.springframework.data.mongodb.core.MongoExceptionTranslator
- All Implemented Interfaces:
org.springframework.dao.support.PersistenceExceptionTranslator
public class MongoExceptionTranslator
extends Object
implements org.springframework.dao.support.PersistenceExceptionTranslator
Simple
PersistenceExceptionTranslator
for Mongo. 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.- Author:
- Oliver Gierke, Michal Vich, Christoph Strobl, Brice Vandeputte
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.dao.DataAccessException
-
Constructor Details
-
MongoExceptionTranslator
public MongoExceptionTranslator()
-
-
Method Details
-
translateExceptionIfPossible
@Nullable public org.springframework.dao.DataAccessException translateExceptionIfPossible(RuntimeException ex) - Specified by:
translateExceptionIfPossible
in interfaceorg.springframework.dao.support.PersistenceExceptionTranslator
-