Click here to Skip to main content
15,902,938 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to Find character in ArrayList Pin
DaveyM692-Jul-10 1:24
professionalDaveyM692-Jul-10 1:24 
Questionnamespace name 'ArrayList' could not be found Pin
raju_shiva1-Jul-10 18:48
raju_shiva1-Jul-10 18:48 
AnswerRe: namespace name 'ArrayList' could not be found Pin
Abhinav S1-Jul-10 18:56
Abhinav S1-Jul-10 18:56 
QuestionHow to find the character in list Pin
raju_shiva1-Jul-10 18:15
raju_shiva1-Jul-10 18:15 
AnswerRe: How to find the character in list Pin
Abhinav S1-Jul-10 18:53
Abhinav S1-Jul-10 18:53 
Generalget the list of all page labels(numbers) Pin
TweakBird1-Jul-10 17:45
TweakBird1-Jul-10 17:45 
QuestionUnhandled exception handler problem Pin
Super Lloyd1-Jul-10 15:45
Super Lloyd1-Jul-10 15:45 
AnswerRe: Unhandled exception handler problem Pin
Luc Pattyn1-Jul-10 17:05
sitebuilderLuc Pattyn1-Jul-10 17:05 
Since you have more than one AppDomain, you would also need more than one AppDomain.CurrentDomain.UnhandledException += someHandler;. And at most one of those could touch the GUI.

From all I've read one can come close to, but never achieve, a situation where all exceptions are caught. There are some very nasty ones when threads are being aborted.

This is what Daniel Grunwald posted on 07-AUG-2008:

The following event handlers seem to catch 97%* of the exceptions:

System.AppDomain.CurrentDomain.UnhandledException (catches all exceptions on secondary threads)
System.Windows.Forms.Application.ThreadException (catches exceptions on the Windows Forms thread)
System.Windows.Threading.Dispatcher.CurrentDispatcher.UnhandledException (catches exceptions in the WPF dispatcher)
try{}catch{} in void Main (catches exceptions on the Main thread that crash Windows Forms/WPF)

The missing 3% are fatal exceptions (e.g. stack overflow) and exceptions in Drag'n'Drop events (both in Windows.Forms and WPF) - those get silently swallowed if not caught in the event handler.

Note that I am able to handle AppDomain.UnhandledException fine without the compatibility setting. You still get the event in .NET 2.0, but the exception will cause the process to terminate after the event handler has run. But you can use the event to display a MessageBox/custom error dialog. You could even keep the app (sort of) going on by putting an infinite sleep at the end of the event handler.

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


GeneralRe: Unhandled exception handler problem Pin
Super Lloyd1-Jul-10 19:16
Super Lloyd1-Jul-10 19:16 
QuestionVS2010 Chart Control [modified] Pin
It_tech1-Jul-10 8:54
It_tech1-Jul-10 8:54 
AnswerRe: VS2010 Chart Control PinPopular
Pete O'Hanlon1-Jul-10 13:13
mvePete O'Hanlon1-Jul-10 13:13 
GeneralRe: VS2010 Chart Control Pin
It_tech1-Jul-10 18:51
It_tech1-Jul-10 18:51 
GeneralRe: VS2010 Chart Control Pin
Daniel Grunwald2-Jul-10 0:37
Daniel Grunwald2-Jul-10 0:37 
GeneralRe: VS2010 Chart Control Pin
DaveyM692-Jul-10 1:35
professionalDaveyM692-Jul-10 1:35 
GeneralRe: VS2010 Chart Control Pin
Pete O'Hanlon2-Jul-10 2:23
mvePete O'Hanlon2-Jul-10 2:23 
Questionto handle Multiple clients.... Pin
yum 20101-Jul-10 8:08
yum 20101-Jul-10 8:08 
AnswerThe hardest part of dealing with mulitple clients Pin
Ennis Ray Lynch, Jr.1-Jul-10 8:27
Ennis Ray Lynch, Jr.1-Jul-10 8:27 
Questionsending serialized listview over tcp Pin
teknolog1231-Jul-10 7:31
teknolog1231-Jul-10 7:31 
AnswerRe: sending serialized listview over tcp Pin
Not Active1-Jul-10 7:50
mentorNot Active1-Jul-10 7:50 
GeneralRe: sending serialized listview over tcp [modified] Pin
teknolog1231-Jul-10 8:10
teknolog1231-Jul-10 8:10 
QuestionHelp in Regular expressions Pin
shankbond1-Jul-10 6:53
shankbond1-Jul-10 6:53 
AnswerRe: Help in Regular expressions Pin
OriginalGriff1-Jul-10 8:46
mveOriginalGriff1-Jul-10 8:46 
GeneralRe: Help in Regular expressions Pin
shankbond1-Jul-10 18:24
shankbond1-Jul-10 18:24 
GeneralRe: Help in Regular expressions Pin
OriginalGriff1-Jul-10 21:49
mveOriginalGriff1-Jul-10 21:49 
GeneralRe: Help in Regular expressions Pin
shankbond4-Jul-10 1:10
shankbond4-Jul-10 1:10 

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.