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! |
* 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:
makeruns successfully./test.shpass