Toma400 / The_Isle_of_Ansur

Python-based text RPG game, successor of Between Shadows and Light.
Other
9 stars 0 forks source link

Raising exceptions in format accessible by users #15

Closed Toma400 closed 2 years ago

Toma400 commented 2 years ago

Since we are going soon with pre-alpha, it'd be good to include some sort of exception handling for all issues that may arise. Currently, IoA just closes the app after encountering any issue, which is no-go. User should be able to have some sort of feedback - either by program printing the error and freezing, or by generating log file.

Here is good place for brainstorming how should I go with this. First way of handling is suggested by me, the second (using logging module of Python) is suggested by julsmanbr, and seems most quality way for resolving this indeed.

Toma400 commented 2 years ago

Useful piece of code being nicely shown on geeksforgeeks. (dw, it's not bot adding random link)

Toma400 commented 2 years ago

As said by the person in topic on reddit btw, I can kinda understand his comment as "make audit log for events appearing", so it'd kinda stack all events like Minecraft log (I could possibly append also correct ones, useful for following player's path? Like character creation, opening specific menus, or sth? So I would know on which menu they crashed, for example?), and printing the issue would be just one of such logs. The idea could be interesting, so if this module is meant for that, I'd request making another issue for adding log feature. Or at least, make it a thing, because it's amazing :P

Toma400 commented 2 years ago

Closed with 933ffe7 and introduction of #19.