MCPcopy Create free account
hub / github.com/wyouflf/xUtils3 / onError

Method onError

xutils/src/main/java/org/xutils/image/ImageLoader.java:433–460  ·  view source on GitHub ↗
(Throwable ex, boolean isOnCallback)

Source from the content-addressed store, hash-verified

431 }
432
433 @Override
434 public void onError(Throwable ex, boolean isOnCallback) {
435 stopped = true;
436 if (!validView4Callback(false)) return;
437
438 fileLockedExceptionRetryCount++;
439 if (ex instanceof FileLockedException && fileLockedExceptionRetryCount < 1000/*max*/) {
440 LogUtil.d("ImageFileLocked: " + key.url);
441 x.task().postDelayed(new Runnable() {
442 @Override
443 public void run() {
444 ImageView imageView = viewRef.get();
445 if (imageView != null) {
446 doBind(imageView, key.url, options, fileLockedExceptionRetryCount, callback);
447 } else {
448 ImageLoader.this.onFinished();
449 }
450 }
451 }, 10);
452 skipOnFinishedCallback = true;
453 } else {
454 LogUtil.e(key.url, ex);
455 setErrorDrawable4Callback();
456 if (callback != null) {
457 callback.onError(ex, isOnCallback);
458 }
459 }
460 }
461
462 @Override
463 public void onCancelled(CancelledException cex) {

Callers

nothing calls this directly

Calls 7

validView4CallbackMethod · 0.95
dMethod · 0.95
eMethod · 0.95
taskMethod · 0.80
postDelayedMethod · 0.65
onErrorMethod · 0.65

Tested by

no test coverage detected