🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.win32
Article #2070

Re: MSVC++ 2.2 exception handling

#2070
From: Michael Falcon-Gates
Date: Tue, 17 Oct 1995 07:35
27 lines
1615 bytes
Paul Stephenson <paul.stephenson@ebu.ericsson.se> wrote:
>
> siv_941268@debet.nhh.no (ROLAND KAUFMANN) wrote:
> >Any kind of exception is caught in this clause. It is the
> >exception-equivalent of the 'else' statement.
> 
> 
> Yes, I realize that.  I'm asking a question about the behavior of the 
> runtime system.  It appears to throw an exception upon an access 
> violation.  If I know the type of that exception, I can write a separate 
> handler to catch it rather than relying on the "catch any" handler.
> 
> 
> 

Oh, boy! (I love this one.) There are two completely separate 
exception handling mechanisms going on here. If you use the C++ 
"catch" keyword, the only way you can catch operating-system
exception is to use catch (...), and you can get no information
about the exception. However, you can use (if you're using VC++, at
least) the __try/__catch keywords (note double underscores). There
is a series of Win32 functions you can call (drat, helpfile's at 
work...) Um, look up "ExecuteExceptionHandler" or "__try" in the 
Win32 SDK help files. The important thing here is the change in
keywords.

-m
Technical Details
Message-ID: <45vmbp$8kf@kaleka.seanet.com>
Path: arc1-ca.pugleaf.net!news.seanet.com!usenet
References: <45k7j5$9rh@cnn.exu.ericsson.se> <1995Oct13.155228.5193@debet> <45u1ta$8ot@cnn.exu.ericsson.se>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.seanet.com!usenet
From: Michael Falcon-Gates <mgates@mgates.seanet.com>
Newsgroups: comp.os.ms-windows.programmer.win32,comp.lang.c++
Subject: Re: MSVC++ 2.2 exception handling
Date: 17 Oct 1995 07:35:21 GMT
Organization: Seanet Online Services, Seattle WA
Message-ID: <45vmbp$8kf@kaleka.seanet.com>
References: <45k7j5$9rh@cnn.exu.ericsson.se> <1995Oct13.155228.5193@debet> <45u1ta$8ot@cnn.exu.ericsson.se>
NNTP-Posting-Host: mgates.seanet.com