Skip to content

Commit

Permalink
add better error and remove raise from a non-matching connection (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwint authored Oct 4, 2024
1 parent 93a0ec5 commit 6da8fac
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion worlds/tracker/TrackerClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,13 @@ def on_package(self, cmd: str, args: dict):
else:
raise "TODO: add error - something went very wrong with interpret_slot_data"
else:
raise "TODO: add error - something went very wrong with matching world to slot"
world_dict = {name: self.launch_multiworld.worlds[slot].game for name, slot in self.launch_multiworld.world_name_lookup.items()}
tb = f"Tried to match game '{args['slot_info'][str(args['slot'])][1]}'" + \
f" to slot name '{args['slot_info'][str(args['slot'])][0]}'" + \
f" with known slots {world_dict}"
self.gen_error = tb
logger.error(tb)
return
else:
# TODO consider allowing worlds that self-attest to not need an options file for UT
self.log_to_tab(f"Player's Yaml not in tracker's list. Known players: {list(self.launch_multiworld.world_name_lookup.keys())}", False)
Expand Down

0 comments on commit 6da8fac

Please sign in to comment.