3 ms·
You can get that by implementing an error type, or otherwise constructing a new error every time one is returned. But doing this adds to the cost of returning t
by zachmu 2y ago
You can get that by implementing an error type, or otherwise constructing a new error every time one is returned. But doing this adds to the cost of returning the error.
This is how we use most errors in our code base. But we tend to not treat them as sentinels, we are only interested in the descriptive error messages.