File tree Expand file tree Collapse file tree
utils/src/main/java/com/haoge/easyandroid/easy Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,19 +112,15 @@ class EasyImageGetter:Html.ImageGetter {
112112
113113 val url = params[0 ]? : throw RuntimeException (" URL is null" )
114114 // 先使用用户设置的loader进行加载
115- try {
116- val result = loader?.invoke(url)
117- if (result != null ) return result
118- } catch (e: Exception ) {
119- Log .e(" EasyImageGetter" , " A error occurs with loader:[${loader?.javaClass?.canonicalName} ]" , e)
120- }
115+ val result = loader?.invoke(url)
116+ if (result != null ) return result
121117
122118 // 当用户设置的loader加载失败时(返回null), 则使用内部机制进行drawable获取
123119 if (glideSupport.not ()) throw RuntimeException (" Internal loader requires glide to load drawable!" )
124120 val context = container.get()?.context? : throw RuntimeException (" Fetch context failed from container" )
125121 return Glide .with (context).load(url).submit().get()
126122 } catch (e: Exception ) {
127- Log .e(" EasyImageGetter" , " A error occurs with internal loader " , e)
123+ Log .e(" EasyImageGetter" , " A error has occurs with error: " , e)
128124 return null
129125 }
130126 }
You can’t perform that action at this time.
0 commit comments