Hi, On Tue, Dec 30, 2025 at 12:25 AM Morgan <[email protected]> wrote:
> On 2025-12-30 07:52, Jakub Zelenka wrote: > > > > Hi, I just published version 2.0 which is a significant redesign > > including: > > > > - Introducing ... StreamErrorCode > > enums.... The > > code is backed (int) because I need to keep the number to easily match > > the category and simplify the mapping. I think that in this case a > > backed enum is better. > > > > Just spitballing here, but perhaps a StreamErrorCategory enum? The Code > could have a method/property that matches it to the corresponding > Category; categorising errors of different kinds can be done by > branching on the Category, rather than (possibly multiple) is*Error() > tests. > This is an interesting idea but it wouldn't work because some categories are overlapping. So is*Error functions seem better fit here. Kind regards, Jakub
