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

Think about possible edge cases #7

Open
RicardoLH opened this issue Jun 10, 2022 · 0 comments
Open

Think about possible edge cases #7

RicardoLH opened this issue Jun 10, 2022 · 0 comments

Comments

@RicardoLH
Copy link

public static List<Movie> fromJsonArray(JSONArray movieJsonArray) throws JSONException {

Let's say you get 100 movies and only one has an error. You app would break because of that. It's usually not a good idea to leave the exceptions there. In this case It's better if you catch it, and simply don't add anything in the array in that step.

That way your app will continue working even though the server sends you a movie in wrong format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant