-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Add an exception handler to Glide requests #30
Conversation
@deathlord87 If this looks ok to you, I'll merge it in. Let me know if you have any comments. Thanks! |
will all the requests from glide be added as a exception handling interface ? |
*/ | ||
@Override | ||
public int hashCode() { | ||
throw new UnsupportedOperationException(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why throw an UnsupportedOperationException() ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be sure that I don't accidentally use the method somewhere. It's basically undefined behavior, these things shouldn't be used in hash maps unless someone explicitly adds an implementation for the method in a subclass.
@deathlord87 It's a bit confusing, but this is not a global error/result listener. Instead it's linked to the given target. So for a given image view, as long as the arguments to glide do not change, the handler passed in will handle exceptions/completions for any loads into that image view. Each request handler therefore may handle multiple loads, but there can be up to one handler per view/target. |
Fixes #26