DEPRECATED-mapbox-ios-sdk icon indicating copy to clipboard operation
DEPRECATED-mapbox-ios-sdk copied to clipboard

Add support for error handling

Open Thinkscape opened this issue 10 years ago • 3 comments

Right now the SDK does not have any support for userland error handlers. It's not possible to catch tile loading errors, api errors or runtime errors with MapBox.

The main delegate RMMapViewDelegate.h only contains user geolocation failure.

Please consider adding reasonable error handling support in next version. From our tests we've concluded that MapBox might fail in some cases due to memory issues, connection problems etc. We'd like to be able to handle that, i.e. reporting problems to the user or silently logging them (i.e. via Crashlytics) for further debugging.

Thinkscape avatar Sep 01 '14 08:09 Thinkscape

Would something as simple as (a) delegate callback(s) for error situations be reasonable?

incanus avatar Sep 02 '14 19:09 incanus

Yes, it usually does. I'd expect it to emit error code (and have list of consts for each possible code) along with detailed message on what went wrong.

Thinkscape avatar Sep 02 '14 19:09 Thinkscape

Cool, I have long considered this mostly wrapped up with https://github.com/mapbox/mapbox-ios-sdk/issues/236 which we punted on, but there is no reason that we can't have a more MBXMapKit-like approach here so that every error situation is reported. Will look into this soon.

incanus avatar Sep 02 '14 19:09 incanus