Skip to content

Commit

Permalink
refactor: update mazerunner to use new deliveryfailureexception
Browse files Browse the repository at this point in the history
  • Loading branch information
fractalwrench committed May 11, 2018
1 parent 3b5babd commit 792f017
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ abstract internal class Scenario(protected val config: Configuration,
val baseDelivery = Bugsnag.getClient().config.delivery
Bugsnag.getClient().config.delivery = object: Delivery {
override fun deliver(payload: SessionTrackingPayload?, config: Configuration?) {
throw NetworkException("Session Delivery NOP", RuntimeException("NOP"))
throw DeliveryFailureException("Session Delivery NOP", RuntimeException("NOP"))
}

override fun deliver(report: Report?, config: Configuration?) {
Expand All @@ -40,8 +40,7 @@ abstract internal class Scenario(protected val config: Configuration,
}

override fun deliver(report: Report?, config: Configuration?) {
throw NetworkException("Session Delivery NOP", RuntimeException("NOP"))

throw DeliveryFailureException("Session Delivery NOP", RuntimeException("NOP"))
}
}

Expand Down
3 changes: 2 additions & 1 deletion sdk/src/main/java/com/bugsnag/android/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,8 @@ void deliver(@NonNull Report report, @NonNull Error error) {
config.getDelivery().deliver(report, config);
Logger.info("Sent 1 new error to Bugsnag");
} catch (DeliveryFailureException exception) {
Logger.warn("Could not send error(s) to Bugsnag, saving to disk to send later", exception);
Logger.warn("Could not send error(s) to Bugsnag,"
+ " saving to disk to send later", exception);
errorStore.write(error);
} catch (Exception exception) {
Logger.warn("Problem sending error to Bugsnag", exception);
Expand Down

0 comments on commit 792f017

Please sign in to comment.