Skip to content

Commit

Permalink
fix: bind view holder exception
Browse files Browse the repository at this point in the history
  • Loading branch information
biezhihua committed Jun 29, 2022
1 parent 469b16a commit c397658
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,19 @@ class GXContainerViewAdapter(
}

override fun onBindViewHolder(holder: GXViewHolder, position: Int) {
return try {
bindGXViewHolder(holder)
} catch (e: Exception) {
val extensionException = GXRegisterCenter.instance.extensionException
if (extensionException != null) {
extensionException.exception(e)
} else {
throw e
}
}
}

private fun bindGXViewHolder(holder: GXViewHolder) {
val childTemplateItem = holder.childTemplateItem
?: throw IllegalArgumentException("childTemplateItem is null")

Expand Down

0 comments on commit c397658

Please sign in to comment.