mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
catch more startup errors
This commit is contained in:
parent
efbb77c078
commit
760e16dfbf
1 changed files with 9 additions and 4 deletions
|
@ -189,6 +189,14 @@ def parseArgs(argv):
|
|||
return parser.parse_args(argv[1:])
|
||||
|
||||
def run():
|
||||
try:
|
||||
_run()
|
||||
except Exception, e:
|
||||
QMessageBox.critical(None, "Startup Error",
|
||||
"Please notify support of this error:\n\n"+
|
||||
traceback.format_exc())
|
||||
|
||||
def _run():
|
||||
global mw
|
||||
|
||||
# parse args
|
||||
|
@ -246,6 +254,3 @@ environment points to a valid, writable folder.""")
|
|||
import aqt.main
|
||||
mw = aqt.main.AnkiQt(app, pm, args)
|
||||
app.exec_()
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
|
|
Loading…
Reference in a new issue