|
10 | 10 | import os |
11 | 11 |
|
12 | 12 | from modules.structs import Game, MsgBox, Os, SearchResult, ThreadMatch |
13 | | -from modules import globals, api, async_thread, db, filepicker, icons, msgbox, utils |
| 13 | +from modules import globals, api, async_thread, db, error, filepicker, icons, msgbox, utils |
14 | 14 |
|
15 | 15 |
|
16 | 16 | def update_start_with_system(toggle: bool): |
@@ -48,7 +48,7 @@ def update_start_with_system(toggle: bool): |
48 | 48 | globals.autostart.unlink() |
49 | 49 | globals.start_with_system = toggle |
50 | 50 | except Exception: |
51 | | - utils.push_popup(msgbox.msgbox, "Start with system error", f"Something went wrong changing the start with system setting:\n{utils.get_error()}", MsgBox.error, more=utils.get_traceback()) |
| 51 | + utils.push_popup(msgbox.msgbox, "Start with system error", f"Something went wrong changing the start with system setting:\n{error.text()}", MsgBox.error, more=error.traceback()) |
52 | 52 |
|
53 | 53 |
|
54 | 54 | async def _launch_exe(path: str): |
@@ -121,7 +121,7 @@ def select_callback(selected): |
121 | 121 | } |
122 | 122 | utils.push_popup(msgbox.msgbox, "File not found", "The selected executable could not be found.\n\nDo you want to select another one?", MsgBox.warn, buttons) |
123 | 123 | except Exception: |
124 | | - utils.push_popup(msgbox.msgbox, "Game launch error", f"Something went wrong launching {executable}:\n{utils.get_error()}", MsgBox.error, more=utils.get_traceback()) |
| 124 | + utils.push_popup(msgbox.msgbox, "Game launch error", f"Something went wrong launching {executable}:\n{error.text()}", MsgBox.error, more=error.traceback()) |
125 | 125 |
|
126 | 126 |
|
127 | 127 | def launch_game(game: Game, executable: str = None): |
@@ -189,7 +189,7 @@ def select_callback(selected): |
189 | 189 | } |
190 | 190 | utils.push_popup(msgbox.msgbox, "Folder not found", "The parent folder for the game executable could not be found.\n\nDo you want to select another executable?", MsgBox.warn, buttons) |
191 | 191 | except Exception: |
192 | | - utils.push_popup(msgbox.msgbox, "Open folder error", f"Something went wrong opening the folder for {executable}:\n{utils.get_error()}", MsgBox.error, more=utils.get_traceback()) |
| 192 | + utils.push_popup(msgbox.msgbox, "Open folder error", f"Something went wrong opening the folder for {executable}:\n{error.text()}", MsgBox.error, more=error.traceback()) |
193 | 193 |
|
194 | 194 |
|
195 | 195 | def open_game_folder(game: Game, executable: str = None): |
@@ -246,7 +246,7 @@ async def _open_webpage(url: str): |
246 | 246 | stderr=subprocess.DEVNULL |
247 | 247 | ) |
248 | 248 | except Exception: |
249 | | - utils.push_popup(msgbox.msgbox, "Open webpage error", f"Something went wrong opening {name}:\n{utils.get_error()}", MsgBox.error, more=utils.get_traceback()) |
| 249 | + utils.push_popup(msgbox.msgbox, "Open webpage error", f"Something went wrong opening {name}:\n{error.text()}", MsgBox.error, more=error.traceback()) |
250 | 250 | if globals.settings.browser_html: |
251 | 251 | async def _fetch_open_page(): |
252 | 252 | html = await api.download_webpage(url) |
|
0 commit comments