diff --git a/menu.py b/menu.py index 542845d..5b0822d 100644 --- a/menu.py +++ b/menu.py @@ -182,11 +182,18 @@ def game_menu(sounds, playCallback=None, *customOptions): try: pygame.mixer.music.fadeout(500) time.sleep(0.5) - except: + except Exception as e: + print(f"Could not fade music: {e}") pass playCallback() else: # Otherwise return "play" to the caller + try: + pygame.mixer.music.fadeout(500) + time.sleep(0.5) + except Exception as e: + print(f"Could not fade music: {e}") + pass return "play" # Handle standard options directly elif selectedOption in ["instructions", "credits", "learn_sounds", "high_scores", "donate"]: @@ -228,7 +235,8 @@ def game_menu(sounds, playCallback=None, *customOptions): try: pygame.mixer.music.fadeout(500) time.sleep(0.5) - except: + except Exception as e: + print(f"Could not fade music: {e}") pass return selectedOption except Exception as e: