J
Jeremy
I've written a web service, with a try catch in my web method. In the
catch, I create a new SoapException instance with a message of "Error Here".
Then I throw the SoapException. In my calling application I call the web
service inside a try catch. When I catch the SoapException, the message
property of the exception is "System.Web.Services.Protocols.SoapException:
Error Here at MyWebService.HandleException(Exception ex) at
MyWebService.MyWebMethod()"
When I throw the SoapException, why does it append the stack trace to the
message, and put "System.Web.Services.Protocols.SoapException: " at the
beginning of the message? Is it possible for me to tell it to retain the
actual message? All I want the calling application to see is the value I
put in the message property.
catch, I create a new SoapException instance with a message of "Error Here".
Then I throw the SoapException. In my calling application I call the web
service inside a try catch. When I catch the SoapException, the message
property of the exception is "System.Web.Services.Protocols.SoapException:
Error Here at MyWebService.HandleException(Exception ex) at
MyWebService.MyWebMethod()"
When I throw the SoapException, why does it append the stack trace to the
message, and put "System.Web.Services.Protocols.SoapException: " at the
beginning of the message? Is it possible for me to tell it to retain the
actual message? All I want the calling application to see is the value I
put in the message property.