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

Explicit errors and fail quickly #39

Open
ashwinvis opened this issue Oct 16, 2021 · 0 comments
Open

Explicit errors and fail quickly #39

ashwinvis opened this issue Oct 16, 2021 · 0 comments
Assignees
Milestone

Comments

@ashwinvis
Copy link
Member

This is not a good pattern to have. @guillaumechauvat had mentioned this before.

logger.error(...)
return 1

Rather than use C / Fortran style integer return, we should raise an error to avoid confusing error messages. This however might break some compatibility in user code, because someone might be not catching the errors as they should.

We can also have a PymechError custom exception if it helps.

@guillaumechauvat guillaumechauvat self-assigned this Oct 16, 2021
@ashwinvis ashwinvis added this to the v2.0.0 milestone Oct 16, 2021
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