mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-01-31 05:10:45 -06:00
Setup: Redirect exceptions properly by overriding sys.excepthook
This commit is contained in:
parent
9d59ee9d8d
commit
92564d4075
@ -35,3 +35,11 @@ error_handler = logging.FileHandler(os.path.join(paths.logs_path(), ERROR_LOG_FI
|
||||
error_handler.setFormatter(formatter)
|
||||
error_handler.setLevel(logging.ERROR)
|
||||
logger.addHandler(error_handler)
|
||||
|
||||
def handle_exception(exc_type, exc_value, exc_traceback):
|
||||
if issubclass(exc_type, KeyboardInterrupt):
|
||||
sys.__excepthook__(exc_type, exc_value, exc_traceback)
|
||||
return
|
||||
logger.error("Uncaught exception", exc_info=(exc_type, exc_value, exc_traceback))
|
||||
|
||||
sys.excepthook = handle_exception
|
||||
|
@ -40,9 +40,9 @@ build_exe_options = dict(
|
||||
build_exe="dist",
|
||||
optimize=1,
|
||||
include_msvcr=True,
|
||||
zip_include_packages=["accessible_output2", "sound_lib", "arrow"],
|
||||
# zip_include_packages=["accessible_output2", "sound_lib", "arrow"],
|
||||
replace_paths = [("*", "")],
|
||||
include_files=["icon.ico", "conf.defaults", "app-configuration.defaults", "keymaps", "locales", "sounds", "documentation", ("keys\lib", "keys"), find_sound_lib_datafiles(), find_accessible_output2_datafiles()]+get_architecture_files(),
|
||||
include_files=["icon.ico", "conf.defaults", "app-configuration.defaults", "keymaps", "locales", "sounds", "documentation", ("keys/lib", "keys/lib"), ["../windows-dependencies/dictionaries", "dictionaries"], find_sound_lib_datafiles(), find_accessible_output2_datafiles()]+get_architecture_files(),
|
||||
packages=["wxUI"],
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user