use of com.querydsl.core.QueryException in project querydsl by querydsl.
the class JavaSE7SQLExceptionWrapper method wrap.
@Override
public RuntimeException wrap(String message, SQLException exception) {
QueryException rv = new QueryException(message, exception);
SQLException linkedException = exception.getNextException();
while (linkedException != null) {
rv.addSuppressed(linkedException);
linkedException = linkedException.getNextException();
}
return rv;
}
use of com.querydsl.core.QueryException in project midpoint by Evolveum.
the class AddObjectContext method execute.
/**
* Inserts the object provided to the constructor and returns its OID.
*/
public String execute() throws SchemaException, ObjectAlreadyExistsException {
try (JdbcSession jdbcSession = repositoryContext.newJdbcSession().startTransaction()) {
String oid = execute(jdbcSession);
jdbcSession.commit();
return oid;
} catch (QueryException e) {
// Querydsl exception, not ours
Throwable cause = e.getCause();
if (cause instanceof PSQLException) {
SqaleUtils.handlePostgresException((PSQLException) cause);
}
throw e;
}
}
Aggregations