From: Fredrik Tolf Date: Thu, 31 Dec 2015 02:44:28 +0000 (+0100) Subject: Raise slightly more helpful error on idpageget failure. X-Git-Url: http://dolda2000.com/gitweb/?p=automanga.git;a=commitdiff_plain;h=0e3381a218fceef0c0f3c8f7f0bd916a35edc0a0 Raise slightly more helpful error on idpageget failure. --- diff --git a/manga/reader.py b/manga/reader.py index c957b13..0940a6c 100644 --- a/manga/reader.py +++ b/manga/reader.py @@ -157,7 +157,10 @@ class idpageget(future): self.idlist = idlist def value(self): - return lib.cursor(self.bnode.byidlist(self.idlist)).cur + try: + return lib.cursor(self.bnode.byidlist(self.idlist)).cur + except KeyError: + raise KeyError("could not find last read page: " + repr(self.idlist)) class pageget(future): def __init__(self, fnode):