News for hackers. Stuff that matters.
Re:Try Three Times by logicallee on Friday March 06, 2015 @01:17PM (#9158538)
> Network delays and problems aren't exceptional--they should be expected. ... might make sense to throw an exception if you aren't going to handle the network issue, or if you have already tried to handle it and failed....But if you're trying to handle the issue then it shouldn't throw an exception.

It sounds like you think exceptions should be used for things you've never thought of, and have no code to handle. But if you don't think there's a way to handle it, what good are exceptions for you - you might as well just barf.

I think in practice people do use exceptions for things they both expect to happen, and know how to handle at that point.

Re:Try Three Times by copsarebastards on Monday March 09, 2015 @03:01PM (#9173102)
> But if you don't think there's a way to handle it, what good are exceptions for you - you might as well just barf.

They provide debugging information to you, as well as the ability to report to the user what went wrong rather than just that something went wrong.

> I think in practice people do use exceptions for things they both expect to happen, and know how to handle at that point.

This is true, and also causes terrible performance. Especially for situations like this where retries are likely to happen quite frequently.