Related articles |
---|
Do most embeded OS and related compilers contains a mechanism like __t gramon@163.com (2003-03-22) |
Re: Do most embeded OS and related compilers contains a mechanism like fjh@students.cs.mu.OZ.AU (2003-03-30) |
Re: Do most embeded OS and related compilers contains a mechanism like alex_mcd@btopenworld.com (Alex McDonald) (2003-03-30) |
Re: Do most embeded OS and related compilers contains a mechanism li jvorbrueggen@mediasec.de (Jan C. =?iso-8859-1?Q?Vorbr=FCggen?=) (2003-03-31) |
Re: Do most embeded OS and related compilers contains a mechanism alex_mcd@btopenworld.com (Alex McDonald) (2003-04-05) |
From: | "Alex McDonald" <alex_mcd@btopenworld.com> |
Newsgroups: | comp.compilers |
Date: | 30 Mar 2003 21:21:59 -0500 |
Organization: | BT Openworld |
References: | 03-03-135 03-03-166 |
Keywords: | errors, |
Posted-Date: | 30 Mar 2003 21:21:59 EST |
"Fergus Henderson" <fjh@students.cs.mu.OZ.AU> wrote in message
> gramon@163.com (gramon) writes:
> >I am studing __try{} in ms Windows and VC,and I am intrested in this
> >mechanism which links the compiler and the OS.But i am not very clear
> >how it works. ...
> >[That's what setjmp and longjmp are for. -John]
>
> In particular, if you are looking for an exception handling library
> that you can use from C code, see my CXCPT library
> <http://www.cs.mu.oz.au/~fjh/CXCPT/index.html>.
For more information, see the Jan 1997 MSJ article " A Crash Course on the
Depths of Win32 Structured Exception Handling"
by Matt Pietrek available at (all on one line):
http://www.microsoft.com/msj/defaultframe.asp?page=/msj/0197/exception/exception.htm&nav=/msj/0197/newnav.htm
Win32 provides a pretty sophisticated mechanism for exception handling
that are setjmp/longjmp-less, and can be used by any compiler that
cares to implement it. Apart from MS products, I'm not aware of any
other Windows-based compiler that uses this technique. The article is
worth (and will probably take) several readings, as the concepts are
not simple; but once grasped you will see that this is an extremely
elegant solution to the problem of handling exceptions in, as the name
suggests, a structured way.
--
Regards
Alex McDonald
Return to the
comp.compilers page.
Search the
comp.compilers archives again.