Linked by Thom Holwerda on Mon 3rd Sep 2012 20:46 UTC, submitted by MOS6510
Thread beginning with comment 533974
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
Features
Linked by Thom Holwerda on 05/21/13 21:38 UTC
Linked by Thom Holwerda on 05/20/13 11:29 UTC
Linked by Thom Holwerda on 05/18/13 21:33 UTC
Linked by David Adams on 05/16/13 4:23 UTC
Linked by Thom Holwerda on 05/11/13 21:41 UTC
Linked by Thom Holwerda on 05/08/13 14:22 UTC
Linked by Thom Holwerda on 05/02/13 15:28 UTC
Linked by Thom Holwerda on 04/29/13 21:06 UTC
Linked by Thom Holwerda on 04/24/13 22:24 UTC
Linked by Thom Holwerda on 04/18/13 11:21 UTC
More Features »
Sponsored Links



Member since:
2006-03-06
I agree that exceptions are often ignored when they should be handled with an intelligible error message.
But I disagree that using error structures is a solution. Firstly it is not reasonable to rely on tooling to verify that all error values are tested. Second it is just awkward to return an error structure with each function.
At least, the stack trace printed by a logged exception can be used by developers to locate the issue. Not great, but much better than continuing with erroneous data (in the case of an ignored error value)
I don't think singletons should be used. If you think you need one, use a function which returns an unique object- at least you have the option to generate more of this object if needed, while if you use a real singleton this is not possible.