List of usage examples for org.springframework.transaction TransactionSystemException getMostSpecificCause
public Throwable getMostSpecificCause()
From source file:ch.systemsx.cisd.openbis.plugin.generic.client.web.server.GenericClientService.java
public DataSetUpdateResult updateDataSet(final DataSetUpdates updates) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { try {/*from w w w. java 2s.co m*/ final String sessionToken = getSessionToken(); return genericServer.updateDataSet(sessionToken, createDataSetUpdatesDTO(updates)); } catch (TransactionSystemException e) { // Deferred triger may throw an exception just before commit. // Message in the exception is readable for the user. throw UserFailureExceptionTranslator .translate(new UserFailureException(e.getMostSpecificCause().getMessage())); } catch (final ch.systemsx.cisd.common.exceptions.UserFailureException e) { throw UserFailureExceptionTranslator.translate(e); } }