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

Better log-ability #47

Closed
saschpe opened this issue Aug 19, 2019 · 1 comment
Closed

Better log-ability #47

saschpe opened this issue Aug 19, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@saschpe
Copy link

saschpe commented Aug 19, 2019

Is your feature request related to a problem? Please describe.
None of the various load methods allow to inspect error conditions, i.e. why an image load failed. At the moment it's next to a black box. Interestingly, there is no log output either.

Describe the solution you'd like
Probably the easiest solution is to let load() methods accept another lambda that is called in case of errors, i.e. onSuccess = (Exception) -> Unit = {}

@saschpe saschpe added the enhancement New feature or request label Aug 19, 2019
@colinrtwhite
Copy link
Member

To get access to the failure Exception you should add a listener:

imageView.load(data) {
    listener(
        onError = { _, error ->
            // Handle the error.
        }
    )
}

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

No branches or pull requests

2 participants