6

So from http://msdn.microsoft.com/en-us/library/ms173161.aspx

Once an exception is thrown, it propagates up the call stack until a catch statement for the exception is found.

So the implcation is that all exception typess can be either caught by a catch(ExceptionType) or a generic catch.

However this is plainly not true. For example AccessViolationException bypasses standard exception handling

How to handle AccessViolationException

So what other exceptions also bypass standard exception handling?

Community
  • 1
  • 1
Simon
  • 33,714
  • 21
  • 133
  • 202
  • 1
    Do you mean, other than those in the accepted answer on that other question? – Rowland Shaw Jul 22 '14 at 20:00
  • @RowlandShaw i threw out the one example to stop people answering "no exceptions bypass catch blocks". i am more curious if there is a definitive list somewhere or several answers to this can, cumulatively, become the definitive list – Simon Jul 22 '14 at 20:05

1 Answers1

1

I would say that a StackOverflowException is most likely unhandled, I'm not aware of others.

LazyOfT
  • 1,428
  • 7
  • 20
  • 1
    You should be while daring to answer such a question. – AgentFire Jul 22 '14 at 19:59
  • That is not handled for different reasons. The act of handling such an exception would require stack, which for obvious reasons is not available. Such an exception is handled by the operating system, which promptly terminates the application. – Lasse V. Karlsen Jul 22 '14 at 19:59
  • The question is what other exceptions bypass standard exception handling, and StackOverflowException bypasses such handling – LazyOfT Jul 22 '14 at 20:00
  • Correct, you are not able to catch a StackOverflowException, though I wish you could catch it but not prevent it from bubbling. I wonder what the rationale there is. – Darren Kopp Jul 22 '14 at 20:03
  • @Brizio a good and obvious one which would have been a better example for me to use :) thanks – Simon Jul 22 '14 at 20:06