catching exceptions globaly in windows application

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 118
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

catching exceptions globaly in windows application

 
0
  #1
Apr 8th, 2009
hi guys, is there anyway of catching exceptions globably in a windows application similar to way we handle exceptions using global file in asp.net aplications?
thanks.
Due to lack of freedom of speech, i no longer post on this website.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,160
Reputation: dickersonka will become famous soon enough dickersonka will become famous soon enough 
Solved Threads: 137
dickersonka dickersonka is offline Offline
Veteran Poster

Re: catching exceptions globaly in windows application

 
0
  #2
Apr 8th, 2009
Not really

Its good practice to handle the exceptions as they occur and decide if you can move on or pass back a specific error message

Here is an example of what you might be looking for though
http://stackoverflow.com/questions/3...er-with-resume
Custom Application & Software Development
www.houseshark.net
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 118
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

Re: catching exceptions globaly in windows application

 
0
  #3
Apr 8th, 2009
Due to lack of freedom of speech, i no longer post on this website.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,160
Reputation: dickersonka will become famous soon enough dickersonka will become famous soon enough 
Solved Threads: 137
dickersonka dickersonka is offline Offline
Veteran Poster

Re: catching exceptions globaly in windows application

 
0
  #4
Apr 8th, 2009
pretty much the same thing

the important piece being this line

  1. Application.ThreadException += new System.Threading.ThreadExceptionEventHandler (Application_ThreadException);

unless you want to use it to catch exceptions that you didn't handle already, its not a recommended solution for error handling
Last edited by dickersonka; Apr 8th, 2009 at 4:11 pm.
Custom Application & Software Development
www.houseshark.net
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC