From 3318f23ff32b42110703dc914268366b59c86e36 Mon Sep 17 00:00:00 2001 From: evandrocoan Date: Thu, 28 May 2020 14:46:38 -0300 Subject: [PATCH] Say which card failed with an exception --- pylib/anki/sched.py | 2 +- pylib/anki/schedv2.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pylib/anki/sched.py b/pylib/anki/sched.py index ff3f0c5d0..c0badf0ac 100644 --- a/pylib/anki/sched.py +++ b/pylib/anki/sched.py @@ -74,7 +74,7 @@ class Scheduler(V2): self._answerRevCard(card, ease) self._updateStats(card, "rev") else: - raise Exception("Invalid queue") + raise Exception("Invalid queue '%s'" % card) self._updateStats(card, "time", card.timeTaken()) card.mod = intTime() card.usn = self.col.usn() diff --git a/pylib/anki/schedv2.py b/pylib/anki/schedv2.py index cab024770..ab3afdc48 100644 --- a/pylib/anki/schedv2.py +++ b/pylib/anki/schedv2.py @@ -104,7 +104,7 @@ class Scheduler: # update daily limit self._updateStats(card, "rev") else: - assert 0 + raise Exception("Invalid queue '%s'" % card) # once a card has been answered once, the original due date # no longer applies