diff --git a/app/src/org/commcare/tasks/templates/CommCareTask.java b/app/src/org/commcare/tasks/templates/CommCareTask.java index 3bf2aebb9f..4f0998643d 100755 --- a/app/src/org/commcare/tasks/templates/CommCareTask.java +++ b/app/src/org/commcare/tasks/templates/CommCareTask.java @@ -39,17 +39,15 @@ protected final Result doInBackground(Params... params) { try { return doTaskBackground(params); } catch (Exception e) { - Logger.log(TAG, "Error during task execution: " + e.getMessage()); - e.printStackTrace(); - if (!(e instanceof UserCausedRuntimeException)) { // Report crashes we know weren't caused by user misconfiguration - CrashUtil.reportException(e); + Logger.exception("Error during task execution: ", e); + } else { + Logger.log(TAG, "Error during task execution: " + e.getMessage()); } // Save error for reporting during post-execute unknownError = e; - return null; } }