Skip to content

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

Description

@gsleap

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions