?
Solved

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

Posted on 2014-12-11
4
Medium Priority
?
132 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

801 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