3 ms·
Right but then you need to use errors.as to match against it, rather than being able to do pattern matching. And there is no inheritance, no ability to generali
by CameronNemo 7y ago
Right but then you need to use errors.as to match against it, rather than being able to do pattern matching. And there is no inheritance, no ability to generalize errors into a group.
- donatj 7y agoYou can totally just type assert your custom error type to check for it. If it's the only type of error your method returns you don't even need to, just define your return type as your custom error type.