Click here to Skip to main content
15,895,799 members
Home / Discussions / C#
   

C#

 
AnswerRe: Catch all but a specific exception Pin
Rob Philpott22-May-12 2:05
Rob Philpott22-May-12 2:05 
GeneralRe: Catch all but a specific exception Pin
Bernhard Hiller22-May-12 2:56
Bernhard Hiller22-May-12 2:56 
SuggestionRe: Catch all but a specific exception Pin
Eddy Vluggen22-May-12 8:59
professionalEddy Vluggen22-May-12 8:59 
GeneralRe: Catch all but a specific exception Pin
Satish3223-May-12 0:08
Satish3223-May-12 0:08 
AnswerRe: Catch all but a specific exception Pin
Richard Andrew x6422-May-12 5:19
professionalRichard Andrew x6422-May-12 5:19 
SuggestionRe: Catch all but a specific exception Pin
Cracked-Down23-May-12 2:01
Cracked-Down23-May-12 2:01 
GeneralRe: Catch all but a specific exception Pin
Bernhard Hiller23-May-12 4:29
Bernhard Hiller23-May-12 4:29 
AnswerRe: Catch all but a specific exception Pin
Cracked-Down23-May-12 4:49
Cracked-Down23-May-12 4:49 
Ok got it!

Do following things
1. Build two separate hierarchies for exception
1.1 For exception that you want to catch log e.g. LoggableException
1.2 For exception that you want to you caller to handle e.g. NonLoggableExcptions
2. Only catch the LoggableException exceptions - log in your case
3. Don not catch NonLoggableExcptions - these will be automatically traverse to the caller
4. The try block code should only throw these two exceptions or the derived objects from these exceptions
5. Don not catch Exception, its a bad practice, which says anything could be happen in the code. can it be Big Grin | :-D . this gives bad impression. though I am not sure if any unhanded exception occurs how it is handled in the client server application as I never worked on it

hope this helps to you and solve you problem...
let me know if you need some further help

Happy Coding
Smile | :)

modified 28-May-12 3:00am.

GeneralRe: Catch all but a specific exception Pin
Cracked-Down27-May-12 21:00
Cracked-Down27-May-12 21:00 
Questionblocking USB ports Pin
Pritam Dalvi21-May-12 21:58
Pritam Dalvi21-May-12 21:58 
AnswerRe: blocking USB ports Pin
Richard MacCutchan21-May-12 22:58
mveRichard MacCutchan21-May-12 22:58 
QuestionDelegate Conversion to Method? [Solved] Pin
Ravi Sant21-May-12 21:06
Ravi Sant21-May-12 21:06 
AnswerRe: Delegate Conversion to Method? Pin
Keith Barrow21-May-12 21:59
professionalKeith Barrow21-May-12 21:59 
GeneralRe: Delegate Conversion to Method? Pin
Ravi Sant21-May-12 23:57
Ravi Sant21-May-12 23:57 
GeneralRe: Delegate Conversion to Method? Pin
Keith Barrow22-May-12 1:38
professionalKeith Barrow22-May-12 1:38 
AnswerRe: Delegate Conversion to Method? Pin
BobJanova22-May-12 0:06
BobJanova22-May-12 0:06 
QuestionBarcode in crystal Report in C# Pin
Member 360103421-May-12 21:04
Member 360103421-May-12 21:04 
AnswerRe: Barcode in crystal Report in C# Pin
Richard MacCutchan21-May-12 22:57
mveRichard MacCutchan21-May-12 22:57 
QuestionWhy no compiler warning in this code? Pin
Tom Clement21-May-12 9:40
professionalTom Clement21-May-12 9:40 
AnswerRe: Why no compiler warning in this code? Pin
Pete O'Hanlon21-May-12 10:03
mvePete O'Hanlon21-May-12 10:03 
GeneralRe: Why no compiler warning in this code? Pin
Tom Clement21-May-12 11:58
professionalTom Clement21-May-12 11:58 
GeneralRe: Why no compiler warning in this code? Pin
Pete O'Hanlon21-May-12 22:15
mvePete O'Hanlon21-May-12 22:15 
AnswerRe: Why no compiler warning in this code? Pin
OriginalGriff21-May-12 21:09
mveOriginalGriff21-May-12 21:09 
AnswerRe: Why no compiler warning in this code? Pin
Bernhard Hiller21-May-12 23:25
Bernhard Hiller21-May-12 23:25 
AnswerRe: Why no compiler warning in this code? Pin
BobJanova21-May-12 23:55
BobJanova21-May-12 23:55 

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.