diff --git a/main.py b/main.py index 5175d6e..3a59673 100644 --- a/main.py +++ b/main.py @@ -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()