# HG changeset patch # User RhodeCode Admin # Date 2023-03-05 17:47:26 # Node ID 5306528bbaf038eb3b70d2730b4cd305ce7a419a # Parent 559c86539aa7ffd594d967745597dd7ffd29704a paginator: report better expcetions diff --git a/rhodecode/lib/pagination.py b/rhodecode/lib/pagination.py --- a/rhodecode/lib/pagination.py +++ b/rhodecode/lib/pagination.py @@ -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