FUNCTION Error(nError, cMethod, nLine) > COMreturnerror(cMethod+' err#='+str(nError,5)+' >line='+str(nline,6)+' '+message(),_VFP.ServerName) > && this line is never executed>I've used this successfully in both COM mtdlls and COM EXEs ..
>>PROTECTED PROCEDURE Error(iError AS Integer, sMethod AS String, iLine as Integer) >> >> LOCAL sSource, sDesc >> >> sSource = "Error " + TRANSFORM(iError) >> sDesc = MESSAGE() + " in method '" + ALLTRIM(sMethod) + "' on line " + TRANS(iLine) >> >> =COMRETURNERROR(sSource, sDesc) >> >>>>