Handling Web Reference errors in a Timer?

Handling Web Reference errors in a Timer?

  
Hello -

I've got an interesting scenario. I have an Action being called by a Timer, and that Action called a Web service via a Web Reference. How do I handle errors kicked out by the Web Reference? There are no Exceptions defined for Web References for me to attach an error handler too. I need to catch errors causes by processing the results, and I need to catch timeouts.

Thanks!

J.Ja
Hello Justin,

You'll have to use a error handler that catches all exceptions, as there is no preset exceptions that are specific for the event you want to handle. To make sure that the error you're handling is derived from the web reference, you should create an action that wraps the web reference call and place the error handler in this action. The action you currently have that is executed by the timer will have to call the wrapper action instead of the web reference directly.

Hope it helps.

FS
Fernando -

That makes sense, thanks! At least I know that "All Exceptions" will catch it, because I wasn't even sure about that.

J.Ja