can someone please try and explain something to me...
i have 2 functions, lets call them FuncA and FuncB. FuncA calls FuncB, and FuncB does some stuff then simply returns. both functinos are placed in try...catch statements:
void FuncA()
{
try
{
FuncB();
}
catch
{
trace("FuncA caught exception calling FuncB");
}
}
void FuncB()
{
//other code
.
.
.
try
{
DoSomethingElse();
}
catch
{
trace("FuncB caught exception calling DoSomethingElse");
}
.
.
.
.
//other code
}
what i am seeing is that an exception is being thrown when DoSomethingElse is being called. BUT! what is being traced out is "FuncA caught exception calling FuncB". this to me is maddness because the function DoSomethingElse is wrapped around its own try---catch handler, so i would expect "FuncB caught exception calling DoSomethingElse" to be traced out.
can anyone give an explanation as to why this might happen?
extra info:
FuncA, FuncB, and DoSomethingElse are not the real function names in my app (unsuprisingly). In reality FuncA is a normal function in an exe, and FuncB is a function on a COM interface (so FuncA actually calls CoCreateInstance before calling FuncB on the COM object). And inside FuncB, DoSomethingElse is actually an ADO function that i am calling on one of microsoft's ADO COM components. i do not think these details are relevent to my question, hence i simplfied things.
thanks to anyone who replies.