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

Return an error type rather than a tuple of string and int #6

Open
lpil opened this issue Feb 28, 2024 · 1 comment
Open

Return an error type rather than a tuple of string and int #6

lpil opened this issue Feb 28, 2024 · 1 comment

Comments

@lpil
Copy link

lpil commented Feb 28, 2024

Hello!

Currently the error value for the command function is very unrefined:

  • The fields are unnamed, so it's unclear what they are without experimentation.
  • The error design states there is a status code, but one may not exist if the program was never run.
  • The error is represented as a string, so the user has to parse this string in order to determine what the error was.

I think it'd be a lot nicer to use if there was an error type. It could have variants for the different kinds of reasons why the process failed to run.

Thanks,
Louis

@tynanbe
Copy link
Owner

tynanbe commented Feb 28, 2024

Thanks, I'll look into it when time allows.

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

No branches or pull requests

2 participants