Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving error handling of expected errors #2366

Closed
Brutus5000 opened this issue Sep 26, 2021 · 1 comment
Closed

Improving error handling of expected errors #2366

Brutus5000 opened this issue Sep 26, 2021 · 1 comment

Comments

@Brutus5000
Copy link
Member

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:

  • If there is a runtime exception related to the game process and an IO exception is flying we know the game has crashed. And we could catch this properly and point the the user to basic game fixes (e.g. turn of your mods, surround sound, ...)
  • If on preparing the game to launch we encounter a AccessDeniedException we can tell the user that there was some issues with setting up the files and potential solutions (Check if game already running, restart pc, try to fix Windows permissions, deactive AV)
  • LoginFailedException: Lost connection to server during login -> it already is a wrapped exception and just needs a nicer text
  • ...

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.

Wanna have the bug fixed quickly?
Visit Issue hunt...
Issue hunt

@Sheikah45
Copy link
Member

Sheikah45 commented Sep 26, 2021

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

@FAForever FAForever locked and limited conversation to collaborators Sep 26, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants