Define Class ComError1 As Session OlePublic Procedure CallComError2() Local loCom2 loCom2 = CreateObject("ComError2.ComError2") loCom2.CauseError() Return "after com2 error" && never happens Endproc Procedure Error(nError, cMethod, nLine) ComReturnError("Error","ComError1") Return "Error occurred" && never happens Endproc EnddefineCode for Object B:
Define Class ComError2 As Session OlePublic Procedure CauseError() ComReturnError("Error","ComError2") Return "After ComReturnError" && never happens Endproc EnddefineI instantiated ComError1 from the command window and executed the CallComError2() method. Very simple code, but hopefully it follows the scenario you described. In my tests, I see "ComError1" in the error message. If control returned directly to the client, I would have expected to see "ComError2" in the error message. If this doesn't match your scenario, let me know what I should change, and I'll try it again.