Skip to content

Add error codes, and make some overall improvements to the logging and handeling of stuff - #335

Closed
Axionyxx wants to merge 35 commits into
space-wizards:masterfrom
Axionyxx:errors
Closed

Axionyxx wants to merge 35 commits into
space-wizards:masterfrom
Axionyxx:errors

Conversation

@Axionyxx

Copy link
Copy Markdown
Member

I spent the better part of last night working on this, instead of being responsible and sleeping :3
See ERROR_CODES.md for list of implemented codes

Closes #47, closes #20, closes #100, closes #292

Body is a TODO, merge as the last part of the v0.41.0 milestone

Okay, so this is a big one. But really 99% of the changes aren't super worth looking at. The main things are just making sure that all places an error or exception is thrown, we also include a unique ErrorCodes to make our life easier
…g the connection window

Futureproofing :3
If we ever add a copy button or something, we don't have to change stuff in like 30 places
So we don't get like a billion ui errors and absolutely fuck the user over
@Axionyxx Axionyxx added this to the V0.41.0 milestone Oct 30, 2026
@github-actions

Copy link
Copy Markdown

This pull request has conflicts, please resolve those before we can evaluate the pull request.

# Conflicts:
#	SS14.Launcher/Views/ConnectingOverlay.xaml
@github-actions

Copy link
Copy Markdown

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@Axionyxx
Axionyxx marked this pull request as ready for review November 8, 2026 21:24
@VerinSenpai

Copy link
Copy Markdown
Contributor

Hey thats pretty cool.

@Fildrance Fildrance left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the stuff that is missing as i don't really know launcher code too well.
There is too many changes in code for one PR imho, but thats not really critical as its all interconnected.
Lots of comments are just thoughts and recommendations, except the TryGetString for localization - launcher failes for me on that.

In general - its a very good thing to have, launcher silently failing brought a lot of sorrow to users. And some code changes look really great.

I have to notice, a lot of new ErrorCode fields on classes look off to me - i suppose this is a workaround, but i would prefer using normal control flow paths or 'Maybe' monade in extremly poor cases. non-auto-resettable field is a call for trouble...
MainWindowViewModel code looks sloppy - i would be happier with more OOP crisp and using decoration instead of direct changes in code flow. Several places in code became even harder to understand and read then before due to that.

Comment thread SS14.Launcher.Tests/ErrorCodesTests.cs Resolved
Comment thread SS14.Launcher.Tests/ErrorCodesTests.cs Resolved
Comment thread SS14.Launcher/Api/AuthApi.cs Resolved
Comment thread SS14.Launcher/Program.cs Resolved
error-code-label = Error code: { $code }
error-code-label-exit-code = Error code: { $code } (exit code { $exit })
error-code-label-exit-signal = Error code: { $code } (exit code { $exit }, signal { $signal })
error-code-help = Include this code when asking for help.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe remark somehow that text is copy-able? its not obvious for usual user from the get-go, and it can really help.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wasn't before and I forgot to include this

Comment thread ERROR_CODES.md Resolved
Comment thread SS14.Launcher.Tests/ErrorHintsTests.cs Resolved
Axionyxx and others added 5 commits November 17, 2026 01:37
Co-authored-by: Fildrance <fildrance@gmail.com>
Co-authored-by: Fildrance <fildrance@gmail.com>
Idk if I like this tbch. But it is ❇️future proof❇️
@Axionyxx
Axionyxx requested a review from Fildrance November 17, 2026 01:33
@Axionyxx Axionyxx closed this Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants