config loading errors done

master
BodgeMaster 2022-02-14 13:34:52 +01:00
parent d34b1f5b35
commit a38e38f96e
1 changed files with 5 additions and 4 deletions

View File

@ -89,9 +89,8 @@ if os.path.isfile(config_file_path):
config_file = open(config_file_path, "r")
configuration = json.loads(config_file.read())
config_file.close()
except:
#TODO: show an error message
warn("Not implemented!")
except Exception:
error("An exception occurred while trying to load the configuration.", handle_gracefully=False)
else:
# config not found
dialog_interaction_handler = Window_Interaction_Handler()
@ -109,9 +108,11 @@ else:
#TODO: store default configuration
warn("Not implemented!")
else:
print("No config present and user chose not to create one. Exiting.")
error("No config present and user chose not to create one. Exiting.", is_exception=False, handle_gracefully=True)
# exit with success exit code anyway because this is not a program failure
sys.exit(EXIT_SUCCESS)
#window = tk.Tk()
#frame = ttk.Frame(window, padding=10)
#frame.grid()