diff --git a/REVHubInterface/__main__.py b/REVHubInterface/__main__.py index 527c3ca..ee111de 100644 --- a/REVHubInterface/__main__.py +++ b/REVHubInterface/__main__.py @@ -8,6 +8,7 @@ import tkinter as tk, tkinter.ttk, tkinter.filedialog, tkinter.messagebox, os, subprocess, time, platform import os import datetime +import traceback # try: # import ft232 @@ -15,15 +16,19 @@ # print(platform.system) # tkinter.messagebox.showerror('Drivers Not Detected', 'Please verify the correct drivers are installed. Without the correct dirvers, firmware update functionality will be unavailable.\n\n - Windows 10 and above should automatically install the correct drivers when the Expansion Hub is plugged in.\n\n - Windows 7 requires a manual install. Please see this link for the correct driver (FTDI D2xx): https://www.ftdichip.com/Drivers/CDM/CDM21228_Setup.zip\n\n - On macOS, install libftdi via Homebrew: "brew install libftdi"\n\n - On Linux, install libftdi. On Debian/Ubuntu-based systems, install it via "sudo apt install libftdi1"\n\nException Message:\n' + str(e)) def error(windowName: str, error: Exception) -> None: - err = str(error) + errName = str(error) + print(errName) + err = str(traceback.format_exc()) print(err) - tkinter.messagebox.showerror(windowName, err) + tkinter.messagebox.showerror(windowName, errName) now = datetime.datetime.now() with open(os.path.expanduser("~") + "/.REVHubInterface/errorlog.txt", "a") as f: f.write(now.strftime("%d/%m/%Y %H:%M:%S")) f.write("\n") f.write(windowName) f.write("\n") + f.write(errName) + f.write("\n") f.write(err)