kk****@yahoo.com (Ken) wrote in message news:<51************************@posting.google.co m>...
Any thoughts on making explicit calls to unexpected()? My sense is
that this function is really intended to be invoked automatically as
part of exception handling. Are there times when explicit calls would
be useful? Or would doing so introduce bug risks or maintanance
headaches unnecessarily?
Thanks for any opinions!
Ken
I think the name says it all really. If you call unexpected()
explicitly, then it's not really unexpected is it? ;-)
The only possible reason for doing so I can think of would have to be
in a assert() type of function, since unexpected() normally calls
abort() which will abort the program(duh!).
And I guess it would introduce maintainance problems since the first
thing I would think of when seeing an explicit call to unexpected
would be utter confusion.
T.