EOAdaptorOperation failedOperation = (EOAdaptorOperation) gae.userInfo().objectForKey(EOAdaptorChannel.FailedAdaptorOperationKey);
if (failedOperation != null) {
Throwable t = failedOperation.exception();
if (t instanceof JDBCAdaptorException) {
JDBCAdaptorException jdbcEx = (JDBCAdaptorException) t;
SQLException sqlEx = jdbcEx.sqlException();
if (sqlEx != null && UNIQUE_CONSTRAINT_EXCEPTION_STATE.equals(sqlEx.getSQLState())) {
String message = sqlEx.getMessage();
MessageFormat format = new MessageFormat(UNIQUE_CONSTRAINT_MESSAGE_FORMAT);
try {
Object[] objs = format.parse(message);