You are here: AxTools > CodeSMART 2007 for VB6 > Documentation > User's Guide > Error Handling > Error Handling Scheme Modifiers
While browsing this page, why not start downloading the evaluation setup kit (direct download, no questions asked).

Error Handling Scheme Modifiers

CodeSMART Error Handling Schemes can be identified by their name. By inserting a scheme name in a special comment at the top of a component or procedure you can force that error handling scheme to be used for that component or procedure, even if the respective component or procedure has an error handling assignment. Error handling scheme modifiers have the biggest priority while deciding what error handler should be used for a procedure.

Error handling engine priorities pyramid
Error handling engine priorities pyramid

To insert error handling scheme modifiers:

  1. Open the code module of the component where you want to insert the error handling scheme modifier.
  2. Optional. Move the cursor to the component declaration area if you want to insert a modifier at component level or into a procedure if you want to insert the modifier in a procedure.
  3. Select the desired modifier from the Modifiers popup of the Code Edit Tools toolbar. A special CodeSMART marker (comment) will be inserted at the current position. If you want to prevent a component or a procedure from being affected by error handling insertion or removal operations then you should insert the Skip modifier.
    Error handler modifiers
    If a component has a modifier marker then all the procedures it contains that do not have a modifier of their own and are not included in an error handling scheme assignment will inherit the scheme specified by that marker. For the above picture in the Form_Load event procedure the ErrReport scheme will be used because this error handling scheme has been specified using a modifier at the component level.

    To remove the error handling scheme modifier for a component or a procedure delete the special marker manually.
 Notes
  • A component or a procedure can have only one error handling scheme modifier.
  • For property procedures with multiple instances (e.g. Let and Get) if a modifier is present then the specified error handling scheme will be used for all instances.
See also
Error Handling Overview
Error Handling Schemes And Assignments
Inserting and Removing Error Handlers
Inserting and Removing Line Numbers
Inserting and Removing Line Numbers from Command Line
Exception Handling Basics
Adding and Removing the Exception Handling Module

Back To Top

Copyright © 2008 AxTools - CodeSMART 2007 for VB6 - Error Handling