473,503 Members | 544 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[MSVC7.1] set_terminate and set_unexpected problem

Hi,

I want to use set_terminate and set_unexpected to control errors in my
program, but it seems that theese two functions don't do anything whet MFC
is in use.

Have you got any idea?

I searched the net and found only that people from Microsoft don't like to
talk about it.

I'm using MSVC 7.1.

-------------------------------------------
void term_func()
{
AfxMessageBox("term_func");
exit(-1);
}
void unexp_func()
{
AfxMessageBox("unexp_func");
terminate();
}

void foo()
{
std::set_terminate(term_func);
std::set_unexpected(unexp_func);
throw "dfkjhgf";
}
-------------------------------------------

TIA

Regards,
Michał Śliwka

Aug 24 '05 #1
3 2988
"Michał Śliwka" <michal.usun_to.sliwka@usun_to.wp.pl> wrote in message
news:de**********@nemesis.news.tpi.pl...
I want to use set_terminate and set_unexpected to control errors in my
program, but it seems that theese two functions don't do anything whet MFC
is in use.

Have you got any idea?

I searched the net and found only that people from Microsoft don't like to
talk about it.

I'm using MSVC 7.1.


VC++ doesn't really support exception specifications. It's hard
to get an unexpected exception if the compiler doesn't know
what to expect.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
Aug 24 '05 #2

Użytkownik "P.J. Plauger" <pj*@dinkumware.com> napisał w wiadomości
news:Y6********************@giganews.com...
"Michał Śliwka" <michal.usun_to.sliwka@usun_to.wp.pl> wrote in message
news:de**********@nemesis.news.tpi.pl...
I want to use set_terminate and set_unexpected to control errors in my
program, but it seems that theese two functions don't do anything whet
MFC is in use.

Have you got any idea?

I searched the net and found only that people from Microsoft don't like
to talk about it.

I'm using MSVC 7.1.


VC++ doesn't really support exception specifications. It's hard
to get an unexpected exception if the compiler doesn't know
what to expect.


Thanks.

But what about set_terminate? set_unexpected is not so important to me.

regards,
Michał Śliwka
Aug 24 '05 #3
"Michał Śliwka" <michal.usun_to.sliwka@usun_to.wp.pl> wrote in message
news:de*********@nemesis.news.tpi.pl...
Użytkownik "P.J. Plauger" <pj*@dinkumware.com> napisał w wiadomości
news:Y6********************@giganews.com...
"Michał Śliwka" <michal.usun_to.sliwka@usun_to.wp.pl> wrote in message
news:de**********@nemesis.news.tpi.pl...
I want to use set_terminate and set_unexpected to control errors in my
program, but it seems that theese two functions don't do anything whet
MFC is in use.

Have you got any idea?

I searched the net and found only that people from Microsoft don't like
to talk about it.

I'm using MSVC 7.1.


VC++ doesn't really support exception specifications. It's hard
to get an unexpected exception if the compiler doesn't know
what to expect.


Thanks.

But what about set_terminate? set_unexpected is not so important to me.


set_terminate works for me.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
Aug 24 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2159
by: xFlasH | last post by:
Hi, Does anybody succeed to compile the PHP 4.3.4 with MSVC7 on a win32 platform? Did id need an additionnal library/toolkit? Thanks for your answer. xF
0
3046
by: Bruce Davis | last post by:
I'm having a problem on windows (both 2000 and XP) with a multi-threaded tkinter gui application. The problem appears to be a deadlock condition when a child thread pops up a Pmw dialog window in...
11
3733
by: Kostatus | last post by:
I have a virtual function in a base class, which is then overwritten by a function of the same name in a publically derived class. When I call the function using a pointer to the derived class...
0
2009
by: Refky Wahib | last post by:
Hi I need Technical Support I finished a Great project using .Net and SQL Server and .Net Mobile Control My Business case is to implement this Program to accept about 1 Million concurrent...
9
2216
by: Sudesh Sawant | last post by:
Hello, We have an application which communicates using remoting. There is a server which is a Windows Service. The server exposes an object which is a singleton. The client is a Web Application...
117
7102
by: Peter Olcott | last post by:
www.halting-problem.com
17
15828
by: Jon Slaughter | last post by:
I'm having a little trouble understanding what the slicing problem is. In B.S.'s C++ PL3rdEd he says "Becayse the Employee copy functions do not know anything about Managers, only the Employee...
0
2635
by: JW | last post by:
I'm using MSVC7.0 and I'm getting a ton of errors with most of them occurring in cstdio. Any thoughts as to what might cause this? d:\Program Files\Microsoft Visual Studio .NET\Vc7...
2
3443
by: bb | last post by:
Hi, I am using gcc v4.0.2 on fedora core 4 (2.6.16). Any reason why the handler set thru' set_unexpected() never gets called in the following code? --------- Code ------------- #include...
0
7203
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7281
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1514
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
737
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
383
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.