-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
27 lines (25 loc) · 677 Bytes
/
Copy pathmain.py
File metadata and controls
27 lines (25 loc) · 677 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""
KeyForge - Key remapping tool
Main application entry point
"""
import sys
import logging
def main():
try:
from src.gui import KeyForgeApp
app = KeyForgeApp()
app.run()
except Exception as e:
logging.getLogger(__name__).critical(f"Fatal error: {e}", exc_info=True)
try:
from tkinter import messagebox
messagebox.showerror(
"KeyForge - Error",
f"An unexpected error occurred:\n\n{type(e).__name__}: {e}\n\n"
"The application will close."
)
except Exception:
pass
sys.exit(1)
if __name__ == "__main__":
main()