joshdholtz / Sentry-Android

[Deprecated] Use official "raven-java" library
https://github.com/getsentry/sentry-java
MIT License
180 stars 48 forks source link

Cache exceptions if the device is offline #7

Closed rickdenhaan closed 10 years ago

rickdenhaan commented 10 years ago

If the device is offline when an exception occurs, the current code will immediately try to push that exception to Sentry. Obviously, that will fail because the device is offline so Sentry is unreachable.

It would be very helpful if the client can cache exceptions and stacktraces locally if submitting the event to Sentry fails (either because the device is offline or another problem occurs -- the request times out for example). Then it can submit the cache when the device is back online.

patrick91 commented 10 years ago

That would be really useful

joshdholtz commented 10 years ago

@rickdenhaan @patrick91 Got a solution for this finally - https://github.com/joshdholtz/Sentry-Android/pull/11

joshdholtz commented 10 years ago

@rickdenhaan @patrick91 I packaged up a pre-release if you'd like to play with it - https://github.com/joshdholtz/Sentry-Android/releases/tag/v1.1.0_pre-1