Skip to content

Commit

Permalink
Properly raises exception instead of just text
Browse files Browse the repository at this point in the history
  • Loading branch information
digiholic committed Aug 12, 2024
1 parent a166a9f commit 9c976cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worlds/osrs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def create_region(self, name: str) -> "Region":
def create_item(self, item_name: str) -> "Item":
items = [item for item in item_rows if item.name == item_name]
if len(items) == 0:
raise f"No matching item found for name {item_name} for player {self.player_name}"
raise Exception(f"No matching item found for name {item_name} for player {self.player_name}")
item = items[0]
index = item_rows.index(item)
return OSRSItem(item.name, item.progression, self.base_id + index, self.player)
Expand Down

0 comments on commit 9c976cb

Please sign in to comment.