Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > How to get information in unhandled exception

Reply
Thread Tools

How to get information in unhandled exception

 
 
Angus
Guest
Posts: n/a
 
      04-10-2008
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?
 
Reply With Quote
 
 
 
 
James Kanze
Guest
Posts: n/a
 
      04-11-2008
On Apr 10, 8:03 pm, Angus <(E-Mail Removed)> wrote:

> 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?


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.

--
James Kanze (GABI Software) email:(E-Mail Removed)
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
an unhandled win32 exception was unhandled occurred in inetinfo.exe Warren Tang ASP .Net 1 09-23-2008 03:01 PM
An unhandled exception of type 'System.Security.SecurityException' occurred in mscorlib.dll Additional information: Requested registry access is not allowed. Ankit Aneja ASP .Net 5 04-06-2006 06:46 AM
An unhandled exception has been caught by the VSW exception filter. Tedka ASP .Net 2 07-19-2004 08:09 PM
An unhandled exception has been caught by the VSW exception filter. Ola ASP .Net 0 04-26-2004 01:00 PM



Advertisments