mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
update deck corrupt messages, include debug info
This commit is contained in:
parent
aa731470ec
commit
24b9a9d1a8
1 changed files with 2 additions and 4 deletions
|
@ -682,12 +682,10 @@ new:
|
||||||
ui.utils.showWarning(_("Deck is already open."))
|
ui.utils.showWarning(_("Deck is already open."))
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
elif hasattr(e, 'data') and e.data.get('type') == 'corrupt':
|
|
||||||
ui.utils.showCritical(_("\
|
|
||||||
File is corrupt.\nPlease restore from backup."), help="DeckErrors")
|
|
||||||
else:
|
else:
|
||||||
ui.utils.showCritical(_("""\
|
ui.utils.showCritical(_("""\
|
||||||
File is corrupt or not an Anki database."""), help="DeckErrors")
|
File is corrupt or not an Anki database. Click help for more info.\n
|
||||||
|
Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors")
|
||||||
self.moveToState("noDeck")
|
self.moveToState("noDeck")
|
||||||
return 0
|
return 0
|
||||||
if media is not None:
|
if media is not None:
|
||||||
|
|
Loading…
Reference in a new issue