From 0e3381a218fceef0c0f3c8f7f0bd916a35edc0a0 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Thu, 31 Dec 2015 03:44:28 +0100 Subject: [PATCH] Raise slightly more helpful error on idpageget failure. --- manga/reader.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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): -- 2.11.0