C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

about exception of standard

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language, library and standards
View previous topic :: View next topic  
Author Message
chenchang
Guest





PostPosted: Tue Apr 20, 2004 5:42 pm    Post subject: about exception of standard Reply with quote



In 15.5.1.2:
"In such cases (Described in 15.5.1.1),
void terminate();
is called(18.6.3). In the situation where no matching handler is found, it
is implementation-defined whether or not the stack is unwound before
terminate() is called." ----- why?



---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]

Back to top
Ben Hutchings
Guest





PostPosted: Thu Apr 22, 2004 5:26 pm    Post subject: Re: about exception of standard Reply with quote



"chenchang" wrote:
Quote:
In 15.5.1.2:
"In such cases (Described in 15.5.1.1),
void terminate();
is called(18.6.3). In the situation where no matching handler is found, it
is implementation-defined whether or not the stack is unwound before
terminate() is called." ----- why?

An unhandled exception indicates a bug, so it is useful to get a dump
of the program state at the point at which the unhandled exception is
thrown. So some implementations call terminate() immediately, which
will typically generate such a dump.

However, simple exception-handling implementations based on setjmp and
longjmp cannot search for a matching handler without unwinding as they
go, so by the time such an implementation determines that an exception
will not be handled it has already unwound the stack.

The standard committee chose not to disallow either of these
implementation techniques.

---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]


Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language, library and standards All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.