Skip to content

Commit

Permalink
SYMMETRICDS-332 - log better message
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Aug 27, 2010
1 parent 954943a commit f09075e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Expand Up @@ -293,9 +293,9 @@ protected int insert(String[] tokens) {
stats.startTimer();
if (enableFallbackUpdate && dbDialect.requiresSavepointForFallback()) {
if (enableFallbackSavepoint) {
savepoint = dbDialect.createSavepointForFallback();
savepoint = dbDialect.createSavepointForFallback();
} else if (context.getTableTemplate().count(context, parseKeys(tokens, 1)) > 0) {
throw new DataIntegrityViolationException("Row already exists");
throw new DataIntegrityViolationException("Row already exists");
}
}
rows = context.getTableTemplate().insert(context, columnValues);
Expand All @@ -311,8 +311,8 @@ protected int insert(String[] tokens) {
stats.incrementFallbackUpdateCount();
rows = context.getTableTemplate().update(context, columnValues, keyValues);
if (rows == 0) {
throw new SymmetricException("LoaderUpdatingFailed", e, context.getTableName(), ArrayUtils
.toString(tokens));
throw new SymmetricException("LoaderFallbackUpdateFailed", e, context.getTableName(), ArrayUtils
.toString(tokens), ArrayUtils.toString(keyValues));
}
} else {
log.error("LoaderInsertingFailed", context.getTableName(), ArrayUtils.toString(tokens));
Expand Down
Expand Up @@ -133,6 +133,7 @@ LauncherMissingArgument=Check the argument you passed in. --%s takes an argumen
LauncherMissingFilenameTriggerSQL=Please provide a file name to write the trigger SQL to
LoaderTokenUnexpected=Unexpected token '%s' on line %d of batch %d
LoaderUpdatingFailedInserting=Unable to update %s, inserting instead: %s
LoaderFallbackUpdateFailed=Fallback to update didn't update any rows on %s. The original insert exception will be logged. The original data was: %s. The keys used for the update attempt were: %s
LoaderInsertingFailedUpdating=Unable to insert into %s, updating instead: %s
LoaderInsertingFailed=Unable to insert into %s, %s
LoaderRowsUpdatingFailed=Too many rows (%d) updated for %s: %s
Expand Down

0 comments on commit f09075e

Please sign in to comment.