Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nested exceptions

Status
Not open for further replies.

biot023

Programmer
Nov 8, 2001
403
0
0
GB
Hallo - I have an exception called Edm_intcatch (public Exception) that I wish to try in a class called Tdm_dirstruct.
I would expect the exception to be caught by MY code in the following example:

try{
PerformAction(); // During this function Edm_intcatch is thrown...
}
catch(Edm_intcatch&){
ShowMessage("Where I expect the catch!");
}

However, the compiler seems to catch it first & display ITS error message.
Could anyone tell me how to catch my own exception & deal with it entirely by myself, without the compiler?

Cheers,
Douglas JL Common sense is what tells you the world is flat.
 
you should put the exception code inside the function where the error ocurrs
 
Sorry, man - I'm not sure I follow you.
DJL Common sense is what tells you the world is flat.
 
There are a number of possible errors that would throw this exception, but only here do I wish to deal with them?
Or am I misunderstanding?
DJL Common sense is what tells you the world is flat.
 
Got it!
Apparently the problem was that I am an idiot.
I had the stop on exception options checked in Tools | Debugger Options | Language Exceptions

Ah, well - not the first time I've looked stupid.

Cheers,
DJL Common sense is what tells you the world is flat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top