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

Refactor & Use KernelError Where Appropriate #282

Open
Kfeavel opened this issue Aug 5, 2021 · 2 comments
Open

Refactor & Use KernelError Where Appropriate #282

Kfeavel opened this issue Aug 5, 2021 · 2 comments
Assignees
Labels
easy Should be easy, good for newcomers enhancement An improvement on a pre-existing code

Comments

@Kfeavel
Copy link
Member

Kfeavel commented Aug 5, 2021

errno.h should be refactored such that it is no longer a long list of defines but a enum instead. There's no reason why we have to follow the POSIX errno model either (though that is an issue for another time).

Additionally, the new enum should be in an Error namespace. This will help prevent name collisions and also provide a meaningful prefix when addressing this next update:

Errors should be refactored such that the names are not abbreviated in typical POSIX fashion but are readable English.
E2BIG should become TooBig, EACCES should become Access, etc. Common abbreviations such as Addr for address and Msg for message are acceptable.

@Kfeavel Kfeavel added enhancement An improvement on a pre-existing code easy Should be easy, good for newcomers labels Aug 5, 2021
@mauryafunez
Copy link

I got this

@Kfeavel
Copy link
Member Author

Kfeavel commented Oct 23, 2021

As part of #318 I refactored errno to enum KernelError and removed all of the errors not used. However, the second part of this issue, using KernelError where appropriate, still needs to be done.

@Kfeavel Kfeavel changed the title Refactor & Use Errno Where Appropriate Refactor & Use KernelError Where Appropriate Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy Should be easy, good for newcomers enhancement An improvement on a pre-existing code
Projects
None yet
Development

No branches or pull requests

2 participants