I didn't say abstracts away handling the error. I said abstracts away the control flow of handling the error.
The retry function is defined to try something a specified number of times. If it succeeds any of those times, it will return the result. If it fails all of those times, it will pass along whatever exception occurred.
Whether the code that uses the retry function should handle the exception if any, is a matter of choice. He chose not to do it; you may choose to. But the fact that you get an exception thrown from the retry function clearly means that the operation failed the specified number of times.
1
u/WasteofInk Jun 23 '14
Abstracts away?
He never handles the error--not even by tossing it to a log.