Skip to content
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

Implements proper user error handling #5

Merged
merged 6 commits into from
Apr 29, 2024

Conversation

LemonInTheDark
Copy link
Collaborator

@LemonInTheDark LemonInTheDark commented Apr 27, 2024

We delineate between user errors and program errors.
Any user error should effectively cascade up to where it's relevant.
We don't want it crashing the program or anything like that either.

What I've done here is expand on the existing use of the UFE library (user facing errors) which gives us nice rendering and the ability to trivially define errors, the reason for them, and how you might fix them.

We combined this with the macro based error library to make easy to use errors for devs with in theory meaningful output for users.

There's a lot of stuff that should error that just doesn't (configs) but I think this is a lot better then how things were before.

There are a few issues, mostly with converting out of crate errors into this system.
It's less a matter of being impossible and more I don't have the kahones to setup hints for every single type on both input and
output failures. So we just let them speak for themselves.

Anyhow tool should crash less and report more now, which is pog.

Oh also I've pulled in owo-colors to make the terminal output a bit more pretty.

image

We deliniate between user errors and program errors.
Any user error should effectively cascasde up to where it's relevant. We
don't want it crashing the program or anything like that either.

What I've done here is expand on the existing use of the UFE library
(user facing errors) which gives us nice rendering and the ability to
trivially define errors, the reason for them, and how you might fix
them.

We combined this with the macro based error library to make easy to use
errors for devs with in theory meaningful output for users.

There's a lot of stuff that should error that just doesn't (configs) but
I think this is a lot better then how things were before.

There are a few issues, mostly with converting out of crate errors into
this system. It's less a matter of being impossible and more I don't
have the kahones to setup hints for every single type on both input and
output failures. So we just let them speak for themselves.

Anyhow tool should crash less and report more now, which is pog.

Oh also I've pulled in owo-colors to make the terminal output a bit
more pretty.
@LemonInTheDark LemonInTheDark merged commit 3eb24cd into spacestation13:master Apr 29, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant