3 ms·
Handling errors in one spot doesn't work for all situations, though, right? Especially in an OO environment an object may need context for retrying a request, o
by wonderzombie 14y ago
Handling errors in one spot doesn't work for all situations, though, right? Especially in an OO environment an object may need context for retrying a request, or some other kind of error decision making. So in practice some exceptions percolate through the object graph, while others are handled in-house, so to speak.
- je42 14y agoIt works for most situations. If you need retry logic - exceptions is the wrong way to go. Errors returned by the standard library are most likely not errors you want to retry by default.
- wonderzombie 14y agoThat depends, though, doesn't it? Just about anything network-related is subject to flakiness, disconnection, and timeouts. That means HTTP, database connections, sockets, etc.