From 35791c850af2aebcf38c0f3a291c577421da7fec Mon Sep 17 00:00:00 2001 From: RhodeCode Admin Date: Sun, 5 Mar 2023 18:47:26 +0100 Subject: [PATCH] paginator: report better expcetions --- rhodecode/lib/pagination.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rhodecode/lib/pagination.py b/rhodecode/lib/pagination.py index d17281c6..efaa8e2f 100644 --- 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