error handling

Posted on 2006-04-03
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?

Question by:mrb121212
    LVL 17

    Expert Comment

    what webservice? :-?

    is blob the valid label defined in the current procedure?
    LVL 8

    Accepted Solution

    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.


    LVL 8

    Expert Comment

    by:Leo Eikelman
    .. 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"



    Author Comment

    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.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now