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:])
|
return parser.parse_args(argv[1:])
|
||||||
|
|
||||||
def run():
|
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
|
global mw
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
|
@ -245,7 +253,4 @@ environment points to a valid, writable folder.""")
|
||||||
# load the main window
|
# load the main window
|
||||||
import aqt.main
|
import aqt.main
|
||||||
mw = aqt.main.AnkiQt(app, pm, args)
|
mw = aqt.main.AnkiQt(app, pm, args)
|
||||||
app.exec_()
|
app.exec_()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
run()
|
|
Loading…
Reference in a new issue