Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make MBRoute.geometry non-optional again #32

Merged
merged 2 commits into from
Apr 7, 2016
Merged

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Apr 7, 2016

#27 made MBRoute.geometry optional, but a route without geometry isn’t much of a route at all. If polyline decoding fails, that means the server returned malformed output. Crash on malformed output.

In the future, we’ll make the library handle malformed output more gracefully using Swift errors, but until the codebase stabilizes somewhat, we’ll play with fire in the form of implicitly unwrapped optionals.

/cc @tmcw

#27 made MBRoute.geometry optional, but a route without geometry isn’t much of a route at all. If polyline decoding fails, that means the server returned malformed output. Crash on malformed output.
@1ec5 1ec5 self-assigned this Apr 7, 2016
@1ec5 1ec5 added the bug label Apr 7, 2016
@1ec5 1ec5 merged commit 85d6bb6 into master Apr 7, 2016
@1ec5 1ec5 deleted the 1ec5-geometry-optional branch April 7, 2016 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant