What is a failure condition in the CLR exception system?

I read this article about handling corrupt state exceptions, and I came across something that puzzled me.

What is a fault proposal?

See a quote from the following article:

An error condition can only pass from a function that contains an unexpected condition for this function. Exceptions have the right to transfer the results of the function to the current function, each frame reaches the frame that knows how to cope with an unforeseen state before the stack. The CLR exception system (called a two-pass system) is an exception for each predecessor by the call flow stack, the start with the caller and some functions say that it will handle the exception (this is called the first pass).

Then the exception system states the state of each frame when calling the stack between where the exception is raised and where it will be processed (known as the second pass). Since the stacks, the CLR will run both at last, sentences and sentences about flaws in every frame when it is unwound. Then catch in the processing frame is executed.

+3
source share
2 answers

According to this article :

Another example of a SEH clause not available in C # is a fault clause. It is similar to the finally clause, except that it is called only when an exception is thrown in the protected block.

:

finally, , , try . , , , .

+6

fault - , CLI, #. finally, , , try ( finally , ).

+2

Source: https://habr.com/ru/post/1706238/


All Articles