How to get information in unhandled exception

A

Angus

Hello

I have some code which throws an exception like this:

try
{
BadFunc();
}
catch(std::exception& e)
{
DebugLog << "MyClass::MyFunc() exception: " << e.what() << endl;
}
catch(...)
{
DebugLog << "MyClass::MyFunc() unhandled exception" << endl;
}

How can I get details of what might have caused the unhanlded
exception?
 
J

James Kanze

I have some code which throws an exception like this:

catch(std::exception& e)
{
DebugLog << "MyClass::MyFunc() exception: " << e.what() << endl;}
catch(...)
{
DebugLog << "MyClass::MyFunc() unhandled exception" << endl;
}
How can I get details of what might have caused the unhanlded
exception?

You can't. The compiler (or rather the runtime library)
obviously have this information available somewhere, but to
date, no one has come up with a reasonable interface to access
it.
 

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

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top