![]() |
|
#1
|
|||
|
|||
unable to jump from one catch to other catch block.Suppose we have
Code:
Last edited by LuciWiz : 09-Jan-2007 at 08:11.
Reason: Added [code] tags
|
|||
|
#2
|
||||
|
||||
Re: unable to jump from one catch to other catch block.__________________
The 3 Laws of the Procrastination Society: 1) Never do today that which can be put off until tomorrow 2) Tomorrow never comes |
|
#3
|
||||
|
||||
Re: unable to jump from one catch to other catch block.Quote:
The question you need to ask yourself is whether you want to actually jump to the block of code in the second catch, or to take the action you would in the second catch as well. If the answer is the first, I guess you can only accomplish it by using the infamous "goto" statement - though I don't know why you would want that. If the answer is the second, then you can simply implement the behavior into a function, and call it for both the first and the second catch: CPP / C++ / C Code:
Or, you could have nested try - catch statements, and throw an exception of type "ex2" thrown from the catch of the first try statement - a bit counter-intuitive, I guess. Best regards, Lucian __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
Recent GIDBlog
Install Adobe Flash - Without Administrator Rights by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unable to catch exception in native code | QED | C++ Forum | 1 | 25-Jan-2006 13:12 |
| Strange C++ code memory leakage problem | gaoanyu | C++ Forum | 7 | 04-Nov-2005 08:09 |
| Having a problem | Chuckles | Computer Hardware Forum | 19 | 13-Sep-2004 12:17 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The