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

Provide mechanism for allowing caller to receive warnings from mwalib #2

Open
gsleap opened this issue May 6, 2020 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@gsleap
Copy link
Member

gsleap commented May 6, 2020

For cases where there are no errors, but warnings, we need a way to provide these to the caller.

This could be done in a similar way to OpenSSL
"The OpenSSL is a cross-platform shared library that had much the same problem to solve. Their method has the library record detailed error information in an internal error queue, which the application can request when an error return value is seen and then present to the user in whichever way is appropriate." ... "There is a function provided for the application to request the "next error". This removes the earliest error from the internal queue, and returns it to the application".

So as warnings are generated as we read and validate the MWA files, we push a warning to the queue.

The caller / client app can pop them off until queue is empty and do whatever with them (log, print to stdout/stderr).

@gsleap gsleap added the enhancement New feature or request label May 6, 2020
@gsleap gsleap self-assigned this May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant