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

secondary: add SummarizeErrors variadic method #96

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jul 29, 2022

  1. secondary: add SummarizeErrors variadic method

    I was recently debugging a workflow with lots
    of async workers able to cancel each other,
    so that by the time an error bubbled up it was
    ambiguous where the longest stack would be
    and whether there were errors in two places
    because one wrapped the other or because of two
    separate root errors. I felt like what would be
    most convenient would be to smoosh everything
    together rather than try to be too smart about it.
    
    This PR implements SummarizeErrors, which is mainly
    the generalization of CombineErrors over n errors.
    If one argument is detectably already wrapping another,
    the result will ignore the latter. If two errors are
    distinct but both wrapping the same error, the result
    will preserve that information.
    Two errors are distinct if err1 != err2; there didn't
    look to be much benefit in bringing in things like .Is
    as we're really interested in identity, not equivalence.
    HonoreDB committed Jul 29, 2022
    Configuration menu
    Copy the full SHA
    3e99fe9 View commit details
    Browse the repository at this point in the history