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

Wrap some osmapi exceptions in Kotlin exceptions #2821

Merged
merged 3 commits into from
May 2, 2021
Merged

Wrap some osmapi exceptions in Kotlin exceptions #2821

merged 3 commits into from
May 2, 2021

Conversation

FloEdelmann
Copy link
Member

Closes #2818.

Copy link
Member Author

@FloEdelmann FloEdelmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should I do about these few missing ones?
(OsmApiException, OsmApiReadResponseException and OsmConnectionException)

@FloEdelmann FloEdelmann marked this pull request as ready for review April 29, 2021 12:34
@westnordost
Copy link
Member

Two thoughts:

  • catching "all" is not viable because f.e. IllegalArgumentException should not be caught
  • Actually, this proposed tryConnect function could maybe even do all/most of the wrapping, f.e. for the authorization exception, so then this will be very little boilerplate code.

@FloEdelmann FloEdelmann marked this pull request as draft May 2, 2021 14:21
@FloEdelmann FloEdelmann marked this pull request as ready for review May 2, 2021 16:24
@westnordost
Copy link
Member

Looks good!

@westnordost
Copy link
Member

I'll merge it right away. And then, with that done, I think I can also release a public alpha version to get some more error reports before launching it as beta in the play store.

@westnordost westnordost merged commit cec42fd into streetcomplete:master May 2, 2021
@FloEdelmann FloEdelmann deleted the pure-kotlin-exceptions branch May 2, 2021 18:39
@westnordost westnordost mentioned this pull request Dec 20, 2023
@FloEdelmann FloEdelmann self-assigned this Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Released
Development

Successfully merging this pull request may close these issues.

[v32] Define/wrap exceptions thrown by MapDataApi and NotesApi in Kotlin
2 participants