-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
If the user tries to type text in the staff credits (Staff/staff_text.md), in Debug Mode, the following error will display:
Reading staff text
Traceback (most recent call last):
File "coilsnake\ui\gui.py", line 304, in _do_compile_help
File "coilsnake\ui\common.py", line 159, in compile_project
File "coilsnake\modules\eb\StaffModule.py", line 247, in read_from_project
File "coilsnake\modules\eb\StaffModule.py", line 165, in read_staff_text_from_project
File "coilsnake\modules\eb\StaffModule.py", line 114, in read_small_line_from_project
File "coilsnake\modules\eb\StaffModule.py", line 108, in read_text_line_from_project
KeyError: '9'
'9'
(There's probably a similar traceback for both small and large text.)
Outside of debug mode, all the user sees is the text '9' for the error (the invalid character). That's super confusing. Properly catch the KeyErrors in these dictionary lookups and raise an appropriate exception from them that gives more context (line number, or the full line of text, or the relevant file/module, or... something).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels