We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

error handling

mrb121212
mrb121212 asked
on
Medium Priority
319 Views
Last Modified: 2010-04-07
Hello guys,
i am trying to handle errors with the usual On Error GoTo blob: however this call to a webservice is not going in there when there is an exception.
Can you guys help out on what to do on this?

thanks
Comment
Watch Question

Muhammad KhanManager, IT
CERTIFIED EXPERT

Commented:
what webservice? :-?

is blob the valid label defined in the current procedure?
Director, IT and Business Development
Commented:
I don't get the question.

Say you make a call to the web service and an error occurs in the web service.  The error will be seen by the web service and not the application that CALLS the web service.  

So if an error occurs in your web service, then return something that will tell the calling application that an error has occured (Like the value -1 or an empty result).  Then just set up an IF statement in your application to check if an error occured and then do something to process the error.

Cheers,

Leo

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Leo EikelmanDirector, IT and Business Development

Commented:
.. just to follow up.  Here is an example.

Say I make a call to a web service and it returns an XML String.  And I want to check if the XML is formatted correctly.  I would do something like this:

If (SomeDomDocument.parseError.errorCode <> 0) Then
            Dim xmlErr
            Set xmlErr = SomeDomDocument.parseError
            errorReason = xmlErr.reason
            Set xmlErr = Nothing
            Err.Raise 10001, "SomeClass", "Configuration File is not in XML format"
Else


Cheers,

Leo

Author

Commented:
thanks for the help Leo.
the 3rd party didn't have any error handling in the web service class and the class that talks to the web service.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.