From c3401bbc2aa0fdee50edc2cb00069af20da0a742 Mon Sep 17 00:00:00 2001 From: PinkSwitch Date: Tue, 21 Jan 2025 01:10:20 -0600 Subject: [PATCH 1/3] Bizhawk client error message --- worlds/_bizhawk/context.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worlds/_bizhawk/context.py b/worlds/_bizhawk/context.py index cb59050b84f6..a79f944f248b 100644 --- a/worlds/_bizhawk/context.py +++ b/worlds/_bizhawk/context.py @@ -236,9 +236,9 @@ def _patch_and_run_game(patch_file: str): metadata, output_file = Patch.create_rom_file(patch_file) Utils.async_start(_run_game(output_file)) return metadata - except Exception as exc: - logger.exception(exc) - return {} + except Exception as e: + Utils.messagebox('Error', str(e), True) + raise def launch(*launch_args: str) -> None: From 0f58ae0da61a1afa9aab143f0d5ff2430ef2e186 Mon Sep 17 00:00:00 2001 From: PinkSwitch <52474902+PinkSwitch@users.noreply.github.com> Date: Tue, 21 Jan 2025 22:27:00 -0600 Subject: [PATCH 2/3] Update worlds/_bizhawk/context.py Co-authored-by: Bryce Wilson --- worlds/_bizhawk/context.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/worlds/_bizhawk/context.py b/worlds/_bizhawk/context.py index a79f944f248b..c69900547a87 100644 --- a/worlds/_bizhawk/context.py +++ b/worlds/_bizhawk/context.py @@ -236,9 +236,10 @@ def _patch_and_run_game(patch_file: str): metadata, output_file = Patch.create_rom_file(patch_file) Utils.async_start(_run_game(output_file)) return metadata - except Exception as e: - Utils.messagebox('Error', str(e), True) - raise + except Exception as exc: + logger.exception(exc) + Utils.messagebox("Error Patching Game", str(e), True) + return {} def launch(*launch_args: str) -> None: From bf566b73be2d6b47bea80d25286b8f98d905bdb9 Mon Sep 17 00:00:00 2001 From: PinkSwitch Date: Tue, 21 Jan 2025 22:32:35 -0600 Subject: [PATCH 3/3] Replace e with exc --- worlds/_bizhawk/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/_bizhawk/context.py b/worlds/_bizhawk/context.py index c69900547a87..accb5f94c482 100644 --- a/worlds/_bizhawk/context.py +++ b/worlds/_bizhawk/context.py @@ -238,7 +238,7 @@ def _patch_and_run_game(patch_file: str): return metadata except Exception as exc: logger.exception(exc) - Utils.messagebox("Error Patching Game", str(e), True) + Utils.messagebox("Error Patching Game", str(exc), True) return {}