Click here to Skip to main content
15,894,825 members
Home / Discussions / C#
   

C#

 
AnswerRe: .exe update Pin
Nagy Vilmos20-Jul-10 19:17
professionalNagy Vilmos20-Jul-10 19:17 
GeneralRe: .exe update Pin
padmanabhan N20-Jul-10 21:13
padmanabhan N20-Jul-10 21:13 
QuestionDataColumn question Pin
Richard Blythe20-Jul-10 14:23
Richard Blythe20-Jul-10 14:23 
AnswerRe: DataColumn question Pin
Dan Mos20-Jul-10 15:22
Dan Mos20-Jul-10 15:22 
QuestionHandling Multiple Exception Types Pin
Matt U.20-Jul-10 13:31
Matt U.20-Jul-10 13:31 
AnswerRe: Handling Multiple Exception Types Pin
Richard Blythe20-Jul-10 14:13
Richard Blythe20-Jul-10 14:13 
GeneralRe: Handling Multiple Exception Types Pin
Matt U.20-Jul-10 14:18
Matt U.20-Jul-10 14:18 
AnswerRe: Handling Multiple Exception Types Pin
Luc Pattyn20-Jul-10 14:17
sitebuilderLuc Pattyn20-Jul-10 14:17 
Hi,

IMO there is no best way, you should do whatever you think fits the functionality. Say it is all part of a method saving a user document, and all you want to obtain is, when things go wrong, you can tell the user the save operation failed and give some indication as to what caused that. Then you might do a simple catch(Exception exc) and communicate the problem.

OTOH if you're going to try and resolve several possible problems, each in their own way, you would need to have separate catch blocks. Whether they go with a common or several separate try blocks again is your choice.

BTW: Coincidentally I'm in the middle of writing a little article on exception handling right now!

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


GeneralRe: Handling Multiple Exception Types Pin
Matt U.20-Jul-10 14:23
Matt U.20-Jul-10 14:23 
GeneralRe: Handling Multiple Exception Types Pin
Richard Blythe20-Jul-10 14:30
Richard Blythe20-Jul-10 14:30 
GeneralRe: Handling Multiple Exception Types Pin
Luc Pattyn20-Jul-10 15:07
sitebuilderLuc Pattyn20-Jul-10 15:07 
GeneralRe: Handling Multiple Exception Types Pin
Matt U.20-Jul-10 15:14
Matt U.20-Jul-10 15:14 
AnswerRe: Handling Multiple Exception Types Pin
PIEBALDconsult20-Jul-10 15:40
mvePIEBALDconsult20-Jul-10 15:40 
AnswerRe: Handling Multiple Exception Types Pin
Ravi Bhavnani20-Jul-10 17:50
professionalRavi Bhavnani20-Jul-10 17:50 
QuestionOldie (as opposed to a newbie) trying to write a Windows Service Pin
jbradshaw20-Jul-10 4:38
jbradshaw20-Jul-10 4:38 
AnswerRe: Oldie (as opposed to a newbie) trying to write a Windows Service Pin
Pete O'Hanlon20-Jul-10 7:38
mvePete O'Hanlon20-Jul-10 7:38 
AnswerRe: Oldie (as opposed to a newbie) trying to write a Windows Service Pin
PIEBALDconsult20-Jul-10 16:49
mvePIEBALDconsult20-Jul-10 16:49 
QuestionHow to convert word document to xsl/xslt [modified] Pin
Exelioindia20-Jul-10 3:05
Exelioindia20-Jul-10 3:05 
AnswerRe: How to convert word document to xsl/xslt Pin
PIEBALDconsult20-Jul-10 3:10
mvePIEBALDconsult20-Jul-10 3:10 
GeneralRe: How to convert word document to xsl/xslt Pin
Exelioindia20-Jul-10 3:24
Exelioindia20-Jul-10 3:24 
GeneralRe: How to convert word document to xsl/xslt Pin
PIEBALDconsult20-Jul-10 3:40
mvePIEBALDconsult20-Jul-10 3:40 
GeneralRe: How to convert word document to xsl/xslt Pin
Exelioindia20-Jul-10 3:51
Exelioindia20-Jul-10 3:51 
GeneralRe: How to convert word document to xsl/xslt Pin
Mycroft Holmes20-Jul-10 15:31
professionalMycroft Holmes20-Jul-10 15:31 
QuestionDotNet and PHP Interactivity Pin
arj_agt20-Jul-10 3:01
arj_agt20-Jul-10 3:01 
AnswerRe: DotNet and PHP Interactivity Pin
Richard MacCutchan20-Jul-10 4:45
mveRichard MacCutchan20-Jul-10 4:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.