[MSVC7.1] set_terminate and set_unexpected problem

M

Micha³ ¦liwka

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
 
P

P.J. Plauger

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
 
M

Micha³ ¦liwka

U¿ytkownik "P.J. Plauger said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,149
Latest member
Vinay Kumar Nevatia0
Top