Skip to content

Commit

Permalink
add constants and message for conflict errors
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed May 27, 2012
1 parent 8083064 commit 0391de9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Expand Up @@ -17,18 +17,14 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License. */


package org.jumpmind.symmetric.common;

/**
*
*/
final public class ErrorConstants {

private ErrorConstants() {
}

public static final String CONFLICT_STATE = "CONFLICT";
public static final int CONFLICT_CODE = -999;


final public static String METADATA_MISSING = "The table metadata was missing from the protocol. Please turn on debug level logging to analyze the CSV data.";
}
Expand Down
Expand Up @@ -15,7 +15,7 @@ public class ConflictException extends RuntimeException {

public ConflictException(CsvData data, Table table, boolean fallbackOperationFailed) {
super(String.format(
"Detected conflict while executing %s on %s. The primary data was: %s. %s", data
"Detected conflict while executing %s on %s. The primary key data was: %s. %s", data
.getDataEventType().toString(), table.getFullyQualifiedTableName(), data
.toColumnNameValuePairs(table.getPrimaryKeyColumnNames(), CsvData.PK_DATA),
fallbackOperationFailed ? "Failed to fallback." : ""));
Expand Down

0 comments on commit 0391de9

Please sign in to comment.