MIFOSX-1396 Delete code displaying dataintegration issue

This commit is contained in:
Madhukar
2014-07-03 12:11:03 +05:30
parent ef7c7c15a3
commit 5cfc7e85c5
@@ -152,6 +152,9 @@ public class CodeValueWritePlatformServiceJpaRepositoryImpl implements CodeValue
.build();
} catch (final DataIntegrityViolationException dve) {
logger.error(dve.getMessage(), dve);
final Throwable realCause = dve.getMostSpecificCause();
if (realCause.getMessage().contains("code_value")) { throw new PlatformDataIntegrityException("error.msg.codeValue.in.use",
"This code value is in use", codeValueId); }
throw new PlatformDataIntegrityException("error.msg.code.value.unknown.data.integrity.issue",
"Unknown data integrity issue with resource: " + dve.getMostSpecificCause().getMessage());
}