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

Add -v CLI flag that prints all paper parsing errors #79

Open
bzz opened this issue Apr 15, 2022 · 0 comments
Open

Add -v CLI flag that prints all paper parsing errors #79

bzz opened this issue Apr 15, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@bzz
Copy link
Owner

bzz commented Apr 15, 2022

Right now on parsing the papers we only count all errors, silently skipping failures and thus hiding their root cause.

// Stats is a number of counters \w stats on paper extraction from gmail messages.
type Stats struct {
Msgs, Titles, Errs int

This leads to difficulties reproducing bugs like #76 as one needs to modify source code (by adding log.Print(err) to

if err != nil {
st.Errs++
) for debugging.

Instead, it would be nice to have:

  • a -v flag that would print all the errors
  • accumulated (e.g as map[Subject][]error) through paper parsing, as part of Stats

That would simplify the debugging, as users would be able to identify the offender emails and attach the specific HTMLs that causes errors.

@bzz bzz added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Apr 15, 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 help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant