CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Brendan Tompkins [MVP]

Blog First. Ask Questions Later.

Welcome Karl Seguin

Welcome to the newest member of CodeBetter.Com, Karl Seguin.  Karl is a Microsoft MVP for Visual Developer - ASP/ASP.NET, and has written numerous articles on ASP.NET and AJAX.

His blog is over here.

-Brendan


Comments

Raymond Lewallen said:

Welcome Karl!
# March 24, 2006 10:30 AM

Shenyi Bao said:

I read your book "Foundations of Programming". It is great. Thank you!

I found sometimes, it is hard to decide to throw an exception or return null in order to show friendly information to client, like "Please try it again!".

I hope it doesn't bother you too much.

For example, one client register, after he clicked submit button, database didn't save his information and throw an exception.

public Hashtable Save(Cleintinfo)

{

try{

 //database options

}

catch(customerException ex)

{

  //log error

 //return null or throw customerException

}

catch(Exception ex)

{

 //log error

 //return null or throw Exception

}

}

# July 31, 2008 2:02 PM

karl said:

My gut feeling says you ought to throw an exception must of the time. If for no other reason than you can communicate a lot more information in an exception than just returning null (like what exactly the user didn't do correctly). If you look at the learning application (codebetter.com/.../foundations-of-programming-learning-application.aspx) you'll see how I dealth with this kinda thing.

# July 31, 2008 6:24 PM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Brendan Tompkins

Brendan has been programming with .NET since the first public beta and is owner and operator of Port Technology Services, a consultancy company providing .NET application development services to the Maritime industry. In July, 2007, he was awarded the Microsoft MVP award for ASP.NET. He's also a proud co-founder of failed .COM startup Intrinsigo, and has had a hand in the failure of numerous other businesses. He currently runs CodeBetter.Com and Devlicio.us, and lives in Norfolk, Virgina with his wife Tiara and son Ian.

View Brendan's profile on LinkedIn

Check out Devlicio.us!

Our Sponsors

Free Tech Publications