Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upsert log error is not showing last sql error sentence #2088

Closed
AlvaroVega opened this issue Sep 28, 2021 · 1 comment
Closed

upsert log error is not showing last sql error sentence #2088

AlvaroVega opened this issue Sep 28, 2021 · 1 comment

Comments

@AlvaroVega
Copy link
Member

it's just printing last sql right sentence

} catch (SQLTimeoutException e) {
cygnusSQLRollback(connection);
if (upsertQuerys.isEmpty() && insertQuery.isEmpty()) {
throw new CygnusPersistenceError(sqlInstance.toString().toUpperCase() + " " + e.getNextException() + " Data insertion error. connection: `" + connection, "SQLTimeoutException", e.getMessage());
} else if (insertQuery.isEmpty()){
throw new CygnusPersistenceError(sqlInstance.toString().toUpperCase() + " " + e.getNextException() + " Data insertion error. upsertQuerys: `" + upsertQuerys, "SQLTimeoutException", e.getMessage());
} else if (upsertQuerys.isEmpty()) {
throw new CygnusPersistenceError(sqlInstance.toString().toUpperCase() + " " + e.getNextException() + " Data insertion error. insertQuery: `" + insertQuery, "SQLTimeoutException", e.getMessage());
}
} catch (SQLException e) {
cygnusSQLRollback(connection);
if (upsertQuerys.isEmpty() && insertQuery.isEmpty()) {
persistError(dataBase, schema, upsertQuerys, e);
throw new CygnusBadContextData(sqlInstance.toString().toUpperCase() + " " + e.getNextException() + " Data insertion error. connection: `" + connection, "SQLException", e.getMessage());
} else if (insertQuery.isEmpty()){
persistError(dataBase, schema, upsertQuerys, e);
throw new CygnusBadContextData(sqlInstance.toString().toUpperCase() + " " + e.getNextException() + " Data insertion error. upsertQuerys: `" + upsertQuerys, "SQLException", e.getMessage());
} else if (upsertQuerys.isEmpty()) {
persistError(dataBase, schema, insertQuery, e);
throw new CygnusBadContextData(sqlInstance.toString().toUpperCase() + " " + e.getNextException() + " Data insertion error. insertQuery: `" + insertQuery, "SQLException", e.getMessage());
}

@fgalan
Copy link
Member

fgalan commented Sep 28, 2021

Fixed by PR #2089

@fgalan fgalan closed this as completed Sep 28, 2021
@fgalan fgalan added this to the release/2.14.0 milestone Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants