G
Greg Robinson
Our web service uses ComInterop to interact with a FoxPro COM dll. The COM
dll assigns 0 - 20 "Error Codes" to a public property at the end of it's
method. If the call to the COM dll was successfull, the COM dll assigns 0 to
the public property. If there was an error, depending on the error, the COM
dll assigns an integer between 1 and 20 to the public property. So I have
code that checks the error number property after the call to the COM dll.
The web method signature looks like this:
Public Function PostProduct() As String
I use to throw a soap exception if the error code was not 0. Non .Net
clients had problems with this (I cannot recall why, this was written 3
years ago). The web method returns a string so I now ( modified 6 months
ago) simply return a string with something like "ERROR CODE = 10".
A new client (web app written with PERL I think) has an issue with this so
it's got me thinking. What's the best practice here? Throw a soapexception
and put the error code in the exception details or return a string with the
error code?
Or, does it really matter?
Greg Robinson
Custom Data Systems, Inc.
www.cds-am.net
dll assigns 0 - 20 "Error Codes" to a public property at the end of it's
method. If the call to the COM dll was successfull, the COM dll assigns 0 to
the public property. If there was an error, depending on the error, the COM
dll assigns an integer between 1 and 20 to the public property. So I have
code that checks the error number property after the call to the COM dll.
The web method signature looks like this:
Public Function PostProduct() As String
I use to throw a soap exception if the error code was not 0. Non .Net
clients had problems with this (I cannot recall why, this was written 3
years ago). The web method returns a string so I now ( modified 6 months
ago) simply return a string with something like "ERROR CODE = 10".
A new client (web app written with PERL I think) has an issue with this so
it's got me thinking. What's the best practice here? Throw a soapexception
and put the error code in the exception details or return a string with the
error code?
Or, does it really matter?
Greg Robinson
Custom Data Systems, Inc.
www.cds-am.net