paginator: report better expcetions
This commit is contained in:
parent
a55db736a0
commit
35791c850a
1 changed files with 2 additions and 2 deletions
|
|
@ -295,10 +295,10 @@ class _Page(list):
|
|||
first = (self.page - 1) * items_per_page
|
||||
last = first + items_per_page
|
||||
self.items = list(self.collection[first:last])
|
||||
except TypeError:
|
||||
except TypeError as err:
|
||||
raise TypeError(
|
||||
"Your collection of type {} cannot be handled "
|
||||
"by paginate.".format(type(self.collection))
|
||||
"by paginate. ERROR:{}".format(type(self.collection), err)
|
||||
)
|
||||
|
||||
# Unless the user tells us how many items the collections has
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue