Solved

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

Posted on 2014-12-11
4
129 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 75

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

737 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