Finish pulling all the cruft out of pyfa.py relating to logging and error handling. All that is now done in separate areas.

Also finally did some major reworking on the error dialog. Now it doesn't spawn a new wxApp and wxFrame for each and every error - attaches to MainFrame and sticks around, having exceptions append to it rather than spawn a new one. In the case that an error happens before MainFrame is available, it spins up a new wxApp. Yay cleanup!
This commit is contained in:
blitzmann
2017-11-26 03:53:38 -05:00
parent 1da127c898
commit c000b19986
4 changed files with 179 additions and 293 deletions

View File

@@ -20,7 +20,6 @@ class PreCheckMessage():
pass
finally:
print(msg)
sys.exit()
def version_precheck():
global version_block
@@ -43,7 +42,7 @@ def version_precheck():
raise Exception()
import wx
version_block += "\nwxPython version: {} (wxWidgets {})".format(VERSION_STRING, wx.wxWidgets_version)
version_block += "\nwxPython version: {} ({})".format(VERSION_STRING, wx.wxWidgets_version)
except:
msg = "pyfa requires wxPython v4.0.0b2+. You can download wxPython from https://wxpython.org/pages/downloads/"
raise PreCheckException(msg)