?
Solved

Cathing (and viewing) the uncaught exception.

Posted on 2003-03-06
5
Medium Priority
?
178 Views
Last Modified: 2010-04-10
Hey,

    I am working on a DLL to integrate with a server written by a partner company.  And I am running into some trouble.  Anyways,  somewhere in my code, an exception is being thrown (but only when it is run in a multi-threaded environment) I have set up a try{}catch(...){} block to catch the exception, but I am getting nowhere and REALY want to see what the exception that is being thrown is.  Is there a way to get the exception?

    Thanks,

         Joey
0
Comment
Question by:kf4oij
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 11

Expert Comment

by:cup
ID: 8082689
At a guess, you're using a Windows system.  What compiler are you using?  On Visual C++, you could invoke the debugger in the catch with 'DebugBreak();' or '__asm { int 3};

If you are using Solaris, you can stop on the throw instructions.  There is something very similar on the HPUX debugger.
0
 

Author Comment

by:kf4oij
ID: 8083329
Hey,

     Yeah, Windows with Visual C++ 6.  That is part of the problem.  The Exception is only thrown when used in the client app (which I don't have source for)  or is there some way, I can run the client app,  with the DLL in the debugger?

          Joey
0
 
LVL 11

Accepted Solution

by:
cup earned 200 total points
ID: 8084436
When your system throws an exception, doesn't it ask you whether you wish to debug or not?  I thought that if you installed VC, it would normally ask you, unless it is some setting that I've switched on by mistake and was totally unaware of.  It normally pops up a dialog box and if you say you wish to debug, it launches the debugger.
0
 
LVL 11

Expert Comment

by:bcladd
ID: 9889619
No comment has been added lately, so it's time to clean up this TA. I will
leave a recommendation in the Cleanup topic area that this question is:

Answered: Points to cup: Grade A

Please leave any comments here within the next seven days.

Experts: Silence means you don't care. Grading recommendations are made in light
of the posted grading guidlines (http://www.experts-exchange.com/help.jsp#hi73).

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

-bcl (bcladd)
EE Cleanup Volunteer
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question