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

Make error handling consistent #11

Open
Zylatis opened this issue Aug 11, 2022 · 0 comments
Open

Make error handling consistent #11

Zylatis opened this issue Aug 11, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Zylatis
Copy link
Owner

Zylatis commented Aug 11, 2022

As noted in current docs:

Not all internal errors are handled the same way. For example, if during the process of checking if rotation is required an error occurs, the default is to print a warning to stdout and not rotate. In contrast to this, if an error occurs during the actual rotation procedure, this error is bubbled up through error handling eventually returning as a std::io::Error to the caller. However probable future state will outsource all error handling logic to the caller of this library rather than making assumptions.

The question is: do we pass all errors up to the caller of write, which might be annoying for transient ones when checking if we should rotate, or do we add some config options to let people decide at compile time. Personally I think the former is safest, at least the user knows where they stand.

@Zylatis Zylatis added enhancement New feature or request good first issue Good for newcomers labels Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant