Improving error handling of expected errors #2367
Replies: 4 comments
-
Yes I agree have been slowly trying to move towards this. For tracking: With the loginFailed Exception those should actually be fixed by the lobby client now might need additionaly wrapping but have not seen what these errors are recently. There is a wrapping process for the game crashing currently based off the exit code of the game log. We could add additional scanning of the game log to identify specific known issues. AccessDeniedExceptions can give direct response of which files could not be accessed |
Beta Was this translation helpful? Give feedback.
-
This should probably start by removing the noCatch and sneakyThrows |
Beta Was this translation helpful? Give feedback.
-
I have to intervene here.
It is true that wrapping them in a plain
All these exceptions will extend Not throwing exceptions at all and just silently logging them or, even worse, returning empty or null values, like done in #2373 is not the solution to this problem. |
Beta Was this translation helpful? Give feedback.
-
I see that brutus clarified in #2368 what he meant and we seem to agree. |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
It creeps me out that we throw away expected exceptions and turn them into runtime exceptions showing them to the user in a "Uh oh, something went wrong we have no clue what" even if we exactly know what the problem was.
This is sort of the result of the relentless suppressing of checked exceptions all over the code.
Unfortunately our users are not capable of reading a stack trace and understanding it. We should try to wrap it into more useful error logs.
Examples:
In cases were we do not catch the exception we could at least try to unwrap CompletionExceptions and remove one layer of exceptions to bring the user closer to the root cause.
Beta Was this translation helpful? Give feedback.
All reactions