Link to home
Start Free TrialLog in
Avatar of Tom Knowlton
Tom KnowltonFlag for United States of America

asked on

catch block

Will both exceptions fire if the exception raised is a COMException, or will just the COMException fire and ignore the general Exception?

try
{
...
...
}
catch(COMException eeee)
                  {
                        genFuncs.SendMessage("tom@thebuyersfund.com","Problem in BFFaxCOM method LoopThroughGiftLetterBookmarks","EntryID:  " + this.FAXCOM_ENTRYID + "\n\n\nERROR MESSAGE FOLLOWS:  " + eeee.ToString());
                        genFuncs.SendMessage("jasons@thebuyersfund.com","Problem in BFFaxCOM method LoopThroughGiftLetterBookmarks","EntryID:  " + this.FAXCOM_ENTRYID + "\n\n\nERROR MESSAGE FOLLOWS:  " + eeee.ToString());
                  }
                  catch(Exception eee)
                  {
                        genFuncs.SendMessage("tom@thebuyersfund.com","Problem in BFFaxCOM method LoopThroughGiftLetterBookmarks","EntryID:  " + this.FAXCOM_ENTRYID + "\n\n\nERROR MESSAGE FOLLOWS:  " + eee.ToString());
                        genFuncs.SendMessage("jasons@thebuyersfund.com","Problem in BFFaxCOM method LoopThroughGiftLetterBookmarks","EntryID:  " + this.FAXCOM_ENTRYID + "\n\n\nERROR MESSAGE FOLLOWS:  " + eee.ToString());
                  }
ASKER CERTIFIED SOLUTION
Avatar of udo_borkowski
udo_borkowski

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Surely only COMException.


Sachi
Avatar of Tom Knowlton

ASKER

??? only COMException will fire?
YES Only COM Exception will be invoked.

Sachi
Avatar of udo_borkowski
udo_borkowski

>  ??? only COMException will fire?

Yes. If you have doubts, just give a try and raise a COMException in your try block and see what happens.