-
Notifications
You must be signed in to change notification settings - Fork 178
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
implement a custom error type for max transcode attempts #2729
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2729 +/- ##
===================================================
- Coverage 56.70668% 56.34075% -0.36593%
===================================================
Files 88 88
Lines 19160 19146 -14
===================================================
- Hits 10865 10787 -78
- Misses 7699 7767 +68
+ Partials 596 592 -4
... and 11 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@mjh1 thanks for looking into that.
Also, I think it's not a good idea to use PS: it's not a high priority feature |
@cyberj0g yeah I was trying to figure out a way to make it generic, it's a little fiddly but I think my latest change should be good enough. It'll get a lot easier in go 1.20 we'll be able wrap multiple errors: https://tip.golang.org/doc/go1.20#errors |
Cool! Maybe we could just backport some functions we are interested in, such as: |
ah good plan 👍 |
@cyberj0g annoyingly i'm not sure it's possible, the |
Ok, let's draft that until Go 1.20 is released. Thanks for researching! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful
* Use a custom error type instead of string matching * changelog --------- Co-authored-by: Thom Shutt <thomshutt@users.noreply.github.com>
What does this pull request do? Explain your changes. (required)
Created a custom error and used multi-error wrapping to avoid needing to do any string matching in the error handling.
Specific updates (required)
How did you test each of these updates (required)
I modified the existing unit test.
Does this pull request close any open issues?
Checklist:
make
runs successfully./test.sh
pass