Contents

What is ErrorHandler

Opening a MAK

Adding Error Code to MAK

Closing a MAK

Printer Setup

Exiting

Listing Subs/Functions in a BAS/FRM

Printing/Viewing a Subs/Function

Generate Error

Error Help

Adding Error Code to MAK

example

Rules when using EH

An Error occurs with Eh

Editing MAKE.LOG

Customizing EH code

LEGAL ISSUES

Copyright

Liability

Ordering

Technical Support


What is ErrorHandler
 What is ErrorHandler ?

EH is a VB development tool, it will work through your applications adding error handling code to every procedure. The main benefit of using EH is TIME.

eg. A professional VB programmer might take :

  60 seconds to insert error handling code into an sub or function.

  Add say 2 hours to write a BAS procedure to handle error calls.

  And finally add 1 hours to test.

 On a medium application with 600 Subs & Functions this process will take upto 	13 hours. EH will do the same task in under 2 minutes.

Errors WITHOUT EH

If no error handling code is in your application, your application will crash if an error occurs.

Errors WITH EH

If an error occurs in code using EH, your user will be informed of the Error, Its position, instructions will be given to report the error (if required) and finally details of the error will be wrote to a ERROR.LOG file.


 Opening a MAK

To open a MAK file for viewing or adding error code either :

1) Select Open from the File menu,

2) Click on the Open button on the Screen.

3) Press CTRL+O on the keyboard.

This will cause a common dialog box to appear, using this file open box select the MAK file you wish to use.

Once your MAK file is loaded all BAS and FRM files are listed under .MAK list.


 Closing a MAK

To Close a MAK file select Close from the File menu.

This will cause you MAK file to be unloaded.


 Exiting

Select Exit from the File menu

If you did not close your MAK file no damage will be done.


 Listing Subs/Functions in a BAS/FRM

To list all the Procedures under a BAS or FRM file either.

1) From the .MAK list list box. select a BAS or FRM and click on the ----> button.

2) Double click on a file in the .MAK list

This will cause a list of all Functions or Subs in a BAS or FRM to be listed under Subs/Function list


 Printing/Viewing a Sub or Function

It is possible to both view and print a selected Sub or Function.

TO VIEW

Having listed all Subs or Function either

1) Double click on the required Sub or Function

2) Select Browse from the Options menu.

This will cause a text box to appear listing the selected Sub or Function

The Copy buttons will copy the text to the clipboard for pasting into a VB application.

The Close button will close the text box window.

TO PRINT

Having listed all Subs or Function either :

1) Select Print from the File Menu.

2) Enter the number of copies to print and Click Print

All printouts are done in landscape.


 Print Setup

To adjust the printer from within EH select Print Setup fromt the File menu.

A common dialog printer setup box will appear.


 Error Help

To get an instant description of an error number  either

1) Select Error Help... from the Options menu.

2) Press CTRL+E on the keyboard

A Error Help window will appear

Enter the error number in the white box and Click Get Error, the appropriate error description will be displayed below.

Click on close to exit this feature.


 Generate Error

To test EH select Generate Error... from the Options menu.

An input box will ask you to enter an error number.

This will automatically cause that error to be simulated.


 An Error Occurs with EH

A box will appear informing the user an error has occurred. this box will displaying

 Error Number

 Description

 Form Name

 Sub/Function Name

 Ccontact number

Your user will be given the choice of selecting either

 ABORT

This will cause an Exit Sub command to occur

 RETRY

Retry the command or event

 IGNORE

Ignore the command and skip to the next line of code

If the error persists more than n times, An alternative box will appear asking the user if they wish to quite the software application.

 YES

this will exit the application

 NO

will retry the command.


 Edit MAKE.LOG

The MAKE.LOG is a text file complied during the process of adding error code.

the file is stored in the EH application directory, and is overwritten every time you run the Add Error Code to MAK... option.

NotePad is loaded with the MAKE.LOG file automatically opened. If you MAKE.LOG file is too long you may be to use an alternative editor.


Add Error Code to MAK
 Add Error Code to MAK...

This option will work through the MAK file you have loaded adding error code to your application.

BACKUP YOU MAK FILE BEFORE USING THIS OPTION.

Before starting you are asked to confirm your selection.

EH works in 2 passes, Firstly the system checks out your project and reports any problems, secondly it will add code to your project.

 PASS 1

This pass will test to make sure all parts of the MAK are saved as text, it will also look for any EH code or User error code in place. If any part of your application was not saved as text you will not be able to proceed onto PASS 2. If Any parts of your code already have User error handling code (ie. Code you have added your self), you will be given the choice bypassing these procedures when adding EH code.

 PASS 2

This pass will rename all your existing BAS or FRM files, One by One it will re-write them adding EH code where necessary.

This pass will also add M90ERROR.BAS to your application. DO NOT DELETE IT.

2 sliding status bars will track the progress of EH whilst  processing the above 2 passes.

 ERROR.LOG

This is a text file built when running the above passes, it will provide a log of what the EH compiling process does. Remember that this log file is overwritten every time you run this process.


Example
 Example of what EH will adds to your code

Sub mnuGenerate_Click ()

On Error GoTo m90EH_mnuGenerate_Click:

'M90ERRORHANDLER <<< DON'T DELETE ME

Exit Sub

m90EH_mnuGenerate_Click:

    gs_m90EH_Formname = "FRMMAIN.FRM"

    gs_m90EH_Procname = "mnuGenerate_Click"

    gi_m90EH_Putlog = True

Select Case (gfi_M90ErrorHandler(gs_m90EH_Formname,           gs_m90EH_Procname,gi_m90EH_Putlog))

Case 3

   	'abort

Exit Sub

Case 4

'retry

Resume

            Case 5

 ignore

 Resume Next

End Select

End Sub


 RULES when using EH

 All BAS or FRM files must have been saved as text

 All End Sub or End Function statements must be in the first column (left hand side of window)

 Dont delete 'M90ERRORHANDLER <<< DON'T DELETE ME where you see it in your code.

 Dont delete or change any Declarations , Functions or Subs in M90ERROR.BAS.


 Customising EH code

It is possible to customize some parts by changing the below constants in the M90ERROR.BAS file.

'INTERNATIONALIZTIONERISUM

Global Const gs_M90EH_dateformat = "DD/MM/YYYY"

Global Const gs_M90EH_timeformat = "hh:nn ss"

'localization

Global gs_m90EH_AppPath As String

'msgbox titles

Global Const gs_m90EH_title = "ErrorHandler"

Global Const gs_m90EH_contact = "Please Report to Micro90 +44 [0]1202 667337   "

Global Const gs_m90EH_application = "ErrorHandler for VB 3.0"


 Technical support

You can obtain technical support from :

Micro90

First Floor

Hamworthy House

New Quay Road

Poole

Dorset

BH16 5LP

ENGLAND

Telephone 	+44 [0]1202 667337

Fax	+44 [0]1202 665609

Compuserve	100534,1100

Internet	micro90@bournemouth-net.co.uk

Office Mobile	0585 172782


 Copyright notice

READ CAREFULLY, USAGE OF THIS SOFTWARE MUST DEPEND ON ACCEPTANCE OF THESE TERMS

(c) ErrorHandler . Copyright Micro90, 1995.

All rights reserved

SHAREWARE VERSION

Evaluation and Registration

 This in not free software. You are hereby licensed to use this software for evaluation purposes without charge for a period of 21days. If you use this software after the 21 day evaluation period a registration fee is required. Payments should be sent to Micro90, First Floor, Hamworthy House, New Quay Road, Poole, Dorset, BH15 4AD, ENGLAND . For cost see : Ordering ErrorHandler

 Unregistered use of ErrorHandler after the 21 day evaluation period is in violation of International copyright laws.

Distribution

 Provided that you verify that you are distributing the Shareware Version (see front title screen for wording Shareware Version) you are hereby licensed to make as many copies of the Shareware Version of this software and documentation as you wish; give exact copies of original Shareware version to anyone, and distribute the Shareware version of the software and documentation in its unmodified form via electronic means. There is no charge for any of the above.

 You are specifically prohibited from charging, or requesting donations for any such copies, however made, and from distributing the software and/or documentation with other products(commercial or otherwise) without prior written permission.

REGISTERED VERSION

 One registered copy of ErrorHandler may either be used by a single company on individual on a standalone machine.

 Micro90 reserve the copyright of the ErrorHandler software which is not to be copied , Reproduced or Disclosed to a third party without the prior written consent of Micro90.

MICRO90 ACCEPT NO LIABILITY FOR ANY DATA LOSS,CLAIMS,FINES OR ANY OTHER KIND OF PENALTY INCURRED BY THE USER

4st Sept 1995

Micro90

First Floor

Hamworthy House

New Quay Road

Poole

Dorset

BH15 4AD

ENGLAND


 Company liability

READ CAREFULLY, USAGE OF THIS SOFTWARE MUST DEPEND ON ACCEPTANCE OF THESE TERMS

4th Sept 1995

The ErrorHandler software system has been carefully designed, complied and checked for technical accuracy. Micro90 accept no liability for inaccuracies or errors. resultings from either ErrorHandler or Incorrect/incompatiable operational usage of peripheral hardware,software.Comments or correspondence regarding the ErrorHandler software system and help files should be addressed to :

Micro90

First Floor

Hamworthy House

New Quay Road

Poole

Dorset

BH15 4AD

ENGLAND

No Refunds will be given if the READ CAREFULLY seal on the disk envelope is broken.

No Refunds will be given for Instant Registrations.

MICRO90 ACCEPT NO LIABILITY FOR ANY DATA LOSS,CLAIMS,FINES OR ANY OTHER KIND OF PENALTY INCURRED BY THE USER


 Ordering ErrorHandler

4th Oct 1995

 If you wish to use ErrorHandler, you must register the software . This will entitle you to technical support.

To Order simply print this form, fill in the details and send with payment to the address below.

Cost

ErrorHandler Order Form ___________________________________________________

Name	_______________________________________________________

Company	_______________________________________________________

Address	_______________________________________________________

_______________________________________________________

_______________________________________________________

_______________________________________________________

_______________________________________________________

Country	_______________________________________________________

Email	_______________________________________________________

Tel	_______________________________________________________

Fax 	_______________________________________________________

Line of  business 	_________________________ VAT/TAX No.___________________

 The latest version of ErrorHandler will be despatched within 21 day of receipt of order/payment.

 Your details will be stored by Micro90 to be used to inform you of Micro90 products. Please tick here _____ if you do not wish your details to be disclosed to a third party.

SEND TO:

Micro90 (Shareware Registration)

First Floor

Hamworthy House

New Quay Road

Poole

Dorset

BH15 4AD

ENGLAND.


 Cost

Simply write a Cheques made payable to Micro90

UK = £75.00

USA = $99.99

Canada=$ 149.99

(Micro90 reserve the right to change this price without notification)

 IF YOU ARE A VAT REGISTERED COMPANY WITHIN THE EC (NOT UK) AND YOU PROVIDE US WITH A VALID VAT NUMBER NO VAT WILL BE CHARGED.