VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

Systems Analysis - System analysis and Design tutorial for Software Engineering

You are here: Visual Basic > Advanced VB6 tutorial > Chapter 12

Handling Errors in the Server and the Client

Two applications will be running when the system invokes a COM component: the client application and the server. When an error happens in your server, you want to make sure the error is handled adequately.

Because your server should run as transparently as possible to the client, your first line of defense for error handling in the server should be full-blown error handling within the server itself.

At times, however, it is more appropriate to let the client handle an error that has occurred. When you need to pass an error back to the client, you can use one of two methods for letting your client application know that an error has occurred:

  • Let the server's methods return a result code to the client showing success or failure.

  • Raise an error code in the server that the system can pass back to the client.

The following sections discuss these two methods.

  1. Passing a Result Code to the Client

  2. Raising an Error to Pass Back to the Client



<< Previous | Contents | Next >>

Home | About Us | Privacy Policy | Contact Us

Copyright © | All Rights Reserved