[Mono-list] Exceptions and error codes.
21 Mar 2003 09:36:30 +0100
On Fri, 2003-03-21 at 09:29, Fergus Henderson wrote:
> On 21-Mar-2003, Richard Torkar <email@example.com> wrote:
> > On Fri, 2003-03-21 at 04:10, Fergus Henderson wrote:
> > > Note that the exception handling scheme used on Windows requires some
> > > overhead for "try" statements even in the case when no exception is thrown.
> > What? ^^^^^^^^^^^^^^ How can that be the case?
> > If the catch does not fire then the try should not be evaluated, right?
> > This is something I've missed completely.
> The Win32 "structured exception handling" mechanism that Windows uses
> keeps a linked list of active exception handlers. When entering a
> "try" statement, the code generated by the compiler needs to insert
> a new handler in the list, and to fill in a variety of fields that
> record information about the handler. When exiting a "try" statement,
> the generated code needs to remove the handler from the list.
Good explanation, thanks!
Dept. of Informatics and Mathematics