943,696 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 439
  • C# RSS
Apr 8th, 2009
0

catching exceptions globaly in windows application

Expand Post »
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.
Featured Poster
Reputation Points: 854
Solved Threads: 127
Banned
serkan sendur is offline Offline
2,057 posts
since Jan 2008
Apr 8th, 2009
0

Re: catching exceptions globaly in windows application

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
Reputation Points: 133
Solved Threads: 141
Veteran Poster
dickersonka is offline Offline
1,162 posts
since Aug 2008
Apr 8th, 2009
0

Re: catching exceptions globaly in windows application

Featured Poster
Reputation Points: 854
Solved Threads: 127
Banned
serkan sendur is offline Offline
2,057 posts
since Jan 2008
Apr 8th, 2009
0

Re: catching exceptions globaly in windows application

pretty much the same thing

the important piece being this line

C# Syntax (Toggle Plain Text)
  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.
Reputation Points: 133
Solved Threads: 141
Veteran Poster
dickersonka is offline Offline
1,162 posts
since Aug 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Totaling and averaging column in datagridview
Next Thread in C# Forum Timeline: Trouble with Array.BinarySearch method





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC