Unhandled exceptions will always be fatal to a process?

Ok,http://www.gotdotnet.com/team/changeinfo/Backwards1.1to2.0/default.aspx#00000097 states that in v2.0 "Applications that throw unhandled exceptions on threads other than the main thread (or ones that come into the runtime from the outside) will crash rather than continue running (potentially abnormally).".

So does this mean that invoking Crash will terminate my process. If so, does this mean invoking Thread.Abort will automatically crash/terminate a process?



using System;
using System.Threading;

namespace ConsoleApplication1
{
publicclass ConsoleCtrl
{
publicstaticvoid Main()
{
Thread t =new Thread(new ThreadStart(Crash));
t.IsBackground =true;
t.Start();
while(true)
Thread.Sleep(1000);
}

staticvoid Crash()
{
thrownew Exception();
}
}
}


[1769 byte] By [HasaniBlackwell] at [2008-2-7]
# 1
not exactly, the firts is thing they will look for default debugger. is there's one in the registry.( refer to Don Box's Essential .Net vol 1) , i there's no default debuger that a usual exception unhandled messagebox let the use to quit or continue.
erymuzuan at 2007-9-8 > top of Msdn Tech,.NET Development,Common Language Runtime...
# 2

However, yes, if an exception goes unhandled on any

thread, you'll be offered the chance to attach a debugger or send an error

report, and then the process will go down. ThreadAbort and AppDomainUnloaded are

the two exceptions, because these are raised by the runtime during app-domain

unloading and should not be fatal to the process.

MVPUser at 2007-9-8 > top of Msdn Tech,.NET Development,Common Language Runtime...
# 3
Thread Abort exceptions are a unique exception and won't terminate the process. If the user's thread doesn't catch and Reset the Abort the exception the exception will cause the thread to be aborted at which point the Thread Abort exception is "handled".

_Rick

RickWinter at 2007-9-8 > top of Msdn Tech,.NET Development,Common Language Runtime...

.NET Development

Site Classified