3 ms·
> You're too far from the cause of the exception to do anything specific with it, the context is lost. Which is perfectly fine. If you _can_ handle the except
by xienze 6y ago
> You're too far from the cause of the exception to do anything specific with it, the context is lost.
Which is perfectly fine. If you _can_ handle the exception near where it happened, do so. Otherwise bubble it up and log it or whatever.
Consider a REST service. If a DB or other error happens, I can retry right then and there if business logic calls for it (probably not), or just kick the can down the road where something appropriate like a 500 response serializer will take care of it. That’s a great pattern in my opinion.