From 182d58e84791d24f9c4c78197d0f73fb8c33b637 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Mon, 8 Sep 2025 11:03:07 +0200 Subject: [PATCH] Choo Choo Charles: Raise InvalidItemError instead of bare Exception --- worlds/cccharles/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worlds/cccharles/__init__.py b/worlds/cccharles/__init__.py index 6d40c0172d..0888d8a850 100644 --- a/worlds/cccharles/__init__.py +++ b/worlds/cccharles/__init__.py @@ -4,7 +4,7 @@ from .Options import CCCharlesOptions from .Rules import set_rules from .Regions import create_regions from BaseClasses import Tutorial, ItemClassification -from worlds.AutoWorld import World, WebWorld +from worlds.AutoWorld import InvalidItemError, World, WebWorld class CCCharlesWeb(WebWorld): @@ -157,7 +157,7 @@ class CCCharlesWorld(World): case "Bug Spray": classification = ItemClassification.progression case _: # Should not occur - raise Exception("Unexpected case met: classification cannot be set for unknown item \"" + name + "\"") + raise InvalidItemError("Unexpected case met: classification cannot be set for unknown item \"" + name + "\"") return CCCharlesItem(name, classification, item_id, self.player)