i got a try { blah; throw; blah; } catch( something ){blah;}
then catch( ... ){ something that isnt a problem; }
each time it ends up going to the catch( ... ) one the program chokes, showing me "The program blah blah has unexpectidly quit (NSS). Debug assertion failed" or something like that.
Any ideas?
Thanx
"If you have any questions you may direct
them to that brick wall over there." - South Park
catch( ... ) wont work
It would help you to find out where the assertion failure was. Basically, an assertion failure means that something wasn''t as it should have been, meaning a pointer that was supposed to hold a value could have been NULL, or if this is a Windows program, some UI element wasn''t valid, but it should have been.
If you''re using VC++, and using the debugger, then my advice would be to make sure you have the source to the Runtime Library on your hard drive (so you can step into it), or the MFC source, and press ''Debug'' on the assertion error dialog. The debugger will then go to the line of code that caused the problem, and you can use the call stack to step back through your code and see what the problem was.
This doesn''t sound like a problem with the catch block itself, but with the code that is in the catch block.
I hope this was clear enough... I''m really tired now
If you''re using VC++, and using the debugger, then my advice would be to make sure you have the source to the Runtime Library on your hard drive (so you can step into it), or the MFC source, and press ''Debug'' on the assertion error dialog. The debugger will then go to the line of code that caused the problem, and you can use the call stack to step back through your code and see what the problem was.
This doesn''t sound like a problem with the catch block itself, but with the code that is in the catch block.
I hope this was clear enough... I''m really tired now
Correction:
"Runtime error! {FILENAME HERE} abnormal program termination"
Using MS VC++6.0 Std
Ive got code for catch( int &thing ) and catch( ... ), almost identical (just has different text), but it only ever stuffs up on the catch(...) . Blame MS?
"If you have any questions you may direct
them to that brick wall over there." - South Park
"Runtime error! {FILENAME HERE} abnormal program termination"
Using MS VC++6.0 Std
Ive got code for catch( int &thing ) and catch( ... ), almost identical (just has different text), but it only ever stuffs up on the catch(...) . Blame MS?
"If you have any questions you may direct
them to that brick wall over there." - South Park
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement