Wednesday, April 21, 2010

Exception vs status returns

From: http://nedbatchelder.com/text/exceptions-vs-status.html

Exceptions provide richer error information

Status codes take valuable channels: 1 return value

Cannot return status codes in implicit code: constructors/destructors

Status codes can go unchecked

Exceptions can cause explicit complexity

Exceptions are invisible in the source code

Exceptions create too many possible exit points for a function


No comments: