getsentry/raven-objc — pull request #36 by manderson-productions (2014-09-29 19:12:29+00:00)
Title: Support for offline network error logging

I needed to support network error logging for Sentry (non-fatal exceptions that occurred due to some kind of network NSError). In most cases it makes sense to save these error reports until the next time the user starts up the app. Otherwise, the errors never get logged.

I am using the same methodology as from the exception reporting. RavenCaptureError() still maintains the same functionality as before, but the new macro RavenCaptureNetworkError() assumes that the network is not accessible, so we save the 'message/error' in the NSUSerDefaults reports until the next time the user launches the app.