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

Os: Use Expected<T, SystemError> instead of return codes #2

Open
kachsheev opened this issue Mar 17, 2024 · 0 comments
Open

Os: Use Expected<T, SystemError> instead of return codes #2

kachsheev opened this issue Mar 17, 2024 · 0 comments

Comments

@kachsheev
Copy link
Member

kachsheev commented Mar 17, 2024

Need:

  • Implement SystemError for Windows/Linux
  • Replace error codes to Expected<T, SystemError>

SystemError class:

class SystemError
{
public:
  SystemError(Status status) noexcept;

  Status code() const noexcept;
  const char *info() const noexcept;

private:
  const char *errorInfo;
  Status errorStatus;
};
@kachsheev kachsheev changed the title Use Expected instead of return codes in Os module Os: Use Expected<T, SystemError> instead of return codes Nov 12, 2024
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

1 participant