3 ms·
You 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
by donatj 7y ago
You 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.