Merge pull request #642 from evandroforks/add_card_debug_message

Say which card failed with an exception
This commit is contained in:
Damien Elmes 2020-06-01 13:23:23 +10:00 committed by GitHub
commit 859dbb7b49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -74,7 +74,7 @@ class Scheduler(V2):
self._answerRevCard(card, ease) self._answerRevCard(card, ease)
self._updateStats(card, "rev") self._updateStats(card, "rev")
else: else:
raise Exception("Invalid queue") raise Exception("Invalid queue '%s'" % card)
self._updateStats(card, "time", card.timeTaken()) self._updateStats(card, "time", card.timeTaken())
card.mod = intTime() card.mod = intTime()
card.usn = self.col.usn() card.usn = self.col.usn()

View file

@ -104,7 +104,7 @@ class Scheduler:
# update daily limit # update daily limit
self._updateStats(card, "rev") self._updateStats(card, "rev")
else: else:
assert 0 raise Exception("Invalid queue '%s'" % card)
# once a card has been answered once, the original due date # once a card has been answered once, the original due date
# no longer applies # no longer applies