Android PageKeyedDataSource (paging library) callback error handling (there is TODO exception in src)
Asked Answered
S

0

6

I want to pass an error exception to my paging adapter via callback.onError(or callback.onRetryableError) in loadInitial or loadafter but always receive crashes. After some debugging I find this in library sources: enter image description here

It's actually what I'm receiving in my crash trace. Just "todo". Dependency version:

'androidx.paging:paging-runtime-ktx:2.1.1'

Does it ok to have such kind of exception message on production at all or I did something wrong? Anyway... Question: any other 'builtin' ways to pass loading error to adapter?

Sheedy answered 4/2, 2020 at 4:2 Comment(2)
Well, in 2.1.2 instead of fixing it they just remove onError & onRetryableError at all.Sheedy
it is terrible when the page load failed, it did not give any method.Wanderlust

© 2022 - 2024 — McMap. All rights reserved.