473,657 Members | 2,517 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_termin ate(term_func);
std::set_unexpe cted(unexp_func );
throw "dfkjhgf";
}
-------------------------------------------

TIA

Regards,
Michał ¦liwka

Aug 24 '05 #1
3 2998
"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******** ************@gi ganews.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******** ************@gi ganews.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
2167
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
3066
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 the context of a main window. The problem does not occur on HPUX or Linux. The following simple example code illustrates the problem and the work around I've come up with; However, I'd like, very much, to get rid of the kludgy work around....
11
3750
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 (ClassB* b; b->func(); ) the base-class function is called instead of the new function in the derived class. All other similar functions (virtual in the base class and overwritten in the the derived class) work fine, it's just this one function. ...
0
2016
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 users So I designed the project as master Node that has all administration
9
2243
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 which makes calls to the service. We are using tcp channel which is using binaryformatter by default. The problem is that after a certain number of remoting calls the calls dont get through to the server. The client application makes the call and...
117
7175
by: Peter Olcott | last post by:
www.halting-problem.com
17
16467
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 part of Manager is copied. ".... and gives the code above as .....
0
2655
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 \PlatformSDK\Include\Guiddef.h(161) : error C2065: 'memcmp' : undeclared identifier d:\Program Files\Microsoft Visual Studio .NET\Vc7
2
3452
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 <iostream> #include <exception> #include <string>
0
8397
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4158
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1957
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1620
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.