update deck corrupt messages, include debug info

This commit is contained in:
Damien Elmes 2010-01-11 19:28:50 +09:00
parent aa731470ec
commit 24b9a9d1a8

View file

@ -682,12 +682,10 @@ new:
ui.utils.showWarning(_("Deck is already open."))
else:
return
elif hasattr(e, 'data') and e.data.get('type') == 'corrupt':
ui.utils.showCritical(_("\
File is corrupt.\nPlease restore from backup."), help="DeckErrors")
else:
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")
return 0
if media is not None: