Skip to content

Commit

Permalink
logs full exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham1g5 committed Dec 11, 2024
1 parent 75a6bf3 commit 4de1c0b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/src/org/commcare/tasks/templates/CommCareTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 4de1c0b

Please sign in to comment.