Dear all:
I´m a bit confused after reading about exception handling in the ECMA
standard.
In Partition I, section 12.4.2, Exception handling, it says:
"A user-filtered handler that runs a user-specified set of CIL
instructions
to determine whether the exception should be ignored (i.e. execution
should
resume), handled by the associated handler, or passed on to the next
protected block."
This clearly states three possible outcomes from the execution of a
user filter:
1) resume execution.
2) handle exception.
3) continue search.
In section 12.4.2.5, Overview of Exception Handling, it says:
"Execution cannot be resumed at the location of the exception, except
with a user-filtered handler."
This reinforces that option 1) (above) is possible.
However in Partition III, section 3.34, endfilter - End filter Clause
of ECH, we are only given two possibilities:
-"exception_continue_search(0) ..."
-"exception_execute_handler(1) ..."
which only cover options 3) and 2) above, respectively.
Is this really inconsistent or am I missing something? Is there a way
to ignore an exception and resume execution with an user-filtered
handler?
Thanks in advance for your help!
Jose Silva
ISEL.IPL.PT
Dave - 30 Dec 2003 02:36 GMT
Jose,
I asked this question a little while ago - the answer I got was that they
had wanted to support restartable/resumable exceptions but it is not
currently implemented, and I did not get an indication that this would be
added in the near future.
Further, even though the CLR runtime supports user-filtered catch filters
and fault blocks, the C# language does not expose a syntax that allows
access to this functionality. Currently only type-filtered catch blocks and
finally blocks are supported in C#. Interestingly the VB language does
support user-filtered handlers by using a "when" expression in the catch
filter.
If you want more details on the previous thread that clarified a number of
these issues, search for messages with "Clarification of ECMA spec and C#
execptions" as the subject.
Dave
> Dear all:
>
[quoted text clipped - 39 lines]
> Jose Silva
> ISEL.IPL.PT