Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return error info as xml?
Message
De
15/08/2001 15:08:16
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00544196
Message ID:
00544258
Vues:
20
>The company developing the client for a VFP COM server wants the error information returned as XML. Apparently the output from ComReturnError() won't do. Suggestions?

Actually you can use ComReturnError() to relay the XML error information back to a COM client. This function was added specifically for improved COM support on errors and is certainly appropriate in this situation.

Although the help files do not specify if there is a limit to the amount of info you can pass back through it.

Perhaps your errors string could look something like this:
<Errors>
  <Error>
    <Number></Number>
    <Description></Description>
  </Error>
</Errors>
There was an article in FoxTalk on this, although I wouldn't go using the XML parser on my error event. The XML string can be constructed on the fly withouth the need for the parser. This is at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfoxtk00/html/MTSerrors.asp .
HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform