Solved

What type of exception is thrown in .NET when a process is killed via task manager?

Posted on 2014-12-11
4
125 Views
Last Modified: 2014-12-17
What type of exception is thrown in .NET when a process is killed via task manager?  I need to be able to differential when a process is killed vs. when a normal exception occurs.

Thanks in advance..
0
Comment
Question by:MRS
4 Comments
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 40495276
What exception? Killing a process is killing a process.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 40495522
Put another way.  When killed via task manager no exception is thrown.  (Also if a program finishing via an execution is normal then you ought to have serious words with your programmers.  Exceptions are thrown when something critically bad and unexpected happens.)
0
 
LVL 11

Accepted Solution

by:
louisfr earned 500 total points
ID: 40495765
On the other hand, when you end a task (instead of killing the process) from the task manager, you can get CloseReason.TaskManagerClosing in the FormClosing event.
0
 

Author Closing Comment

by:MRS
ID: 40505249
Thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This video discusses moving either the default database or any database to a new volume.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now