Skip to content

Commit

Permalink
log unexpected error instead of failing on a null pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Nov 26, 2012
1 parent f4dec27 commit a9cf6b5
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -764,9 +764,10 @@ protected void enableSyncTriggers(DataContext context) {

public void batchInError(DataContext context, Exception ex) {
try {
ex.printStackTrace();
Batch batch = context.getBatch();
if (context.getWriter() != null) {
if (context.getWriter() != null &&
context.getReader().getStatistics().get(batch) != null &&
context.getWriter().getStatistics().get(batch) != null) {
this.currentBatch.setValues(context.getReader().getStatistics().get(batch),
context.getWriter().getStatistics().get(batch), false);
statisticManager.incrementDataLoaded(this.currentBatch.getChannelId(),
Expand Down

0 comments on commit a9cf6b5

Please sign in to comment.