Skip to content

Commit

Permalink
Merge branch 'master' into add-mavencentral-repo
Browse files Browse the repository at this point in the history
  • Loading branch information
fractalwrench committed Dec 14, 2018
2 parents 4bc792c + 8f5a204 commit 8b1cbbc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Changelog

## 4.X.X (TBD)

### Bug fixes

* Prevent errors from leaving a self-referencing breadcrumb
[#391](https://github.com/bugsnag/bugsnag-android/pull/391)

## 4.9.3 (2018-11-29)

### Bug fixes

* Handle null values in MetaData.mergeMaps, preventing potential NPE
[#386](https://github.com/bugsnag/bugsnag-android/pull/386)


## 4.9.2 (2018-11-07)

### Bug fixes
Expand Down
4 changes: 4 additions & 0 deletions sdk/src/main/java/com/bugsnag/android/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,9 @@ public void run() {
default:
break;
}
}

private void leaveErrorBreadcrumb(@NonNull Error error) {
// Add a breadcrumb for this error occurring
String exceptionMessage = error.getExceptionMessage();
Map<String, String> message = Collections.singletonMap("message", exceptionMessage);
Expand Down Expand Up @@ -1222,10 +1224,12 @@ void deliver(@NonNull Report report, @NonNull Error error) {
try {
config.getDelivery().deliver(report, config);
Logger.info("Sent 1 new error to Bugsnag");
leaveErrorBreadcrumb(error);
} catch (DeliveryFailureException exception) {
Logger.warn("Could not send error(s) to Bugsnag,"
+ " saving to disk to send later", exception);
errorStore.write(error);
leaveErrorBreadcrumb(error);
} catch (Exception exception) {
Logger.warn("Problem sending error to Bugsnag", exception);
}
Expand Down

0 comments on commit 8b1cbbc

Please sign in to comment.