Click here to Skip to main content
15,899,754 members
Articles / General Programming

Returning a value or throwing an exception

Rate me:
Please Sign up or sign in to vote.
1.00/5 (1 vote)
6 May 2010CPOL2 min read 6.8K   1  
The other day my colleague was probing around whether to return a value or to throw an exception in general scenarios and I initially told him that throwing exceptions almost always incur performance costs as compared to a returned value. We had then left the discussion there itself but...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead Microsoft India R&D Pvt. Ltd. Hyderabad
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions