Exception / Error Handlers Options

Top  Previous  Next

 VS   VB6   VBA 

The Exception / Error Handlers Options section of the Team Options tab allows you to customize the templates of the Insert Exception / Error Handler feature:

OptionsExceptionHandlers

To create an exception / error handler you use the following window:

ExceptionHandler

In this window you enter the following properties:

  • Description: a text describing the exception / error handler.
  • Template Text: the actual text of the exception / error handler. Using the Insert > button, you can include in the text predefined variables (whose value is assigned automatically by MZ-Tools, such as selected text, name of method, etc.) or user-defined variables (whose value is asked when the exception / error handler is inserted).
  • Author: the author of the exception / error handler.

For Visual Studio:

  • Expansion Keyword (optional): a keyword that you can type in the code window and then "expands" it to the whole template text. This can save you time since you avoid the window to select an exception handler when you use the Insert Exception Handler toolbar button or menu. To learn how to expand a keyword see Keyword Expansion.
  • Command Name (optional): MZ-Tools provides nine commands (MZTools.ExceptionHandler1 ... MZTools.ExceptionHandler9 for Visual Studio 2015 and higher, and MZTools8.ExceptionHandler1 ... MZTools8.ExceptionHandler9 for Visual Studio 2013 and lower) that you can associate with exception handler templates. When you execute an exception handler command (typically through a keyboard shortcut, or creating a button on a toolbar from that command), the associated code template text is inserted in the code.

For VB6 / VBA:

  • Expansion Keyword (optional): a keyword that you can type in the code window and then "expands" it to the whole template text. This can save you time since you avoid the window to select an error handler when you use the Insert Error Handler toolbar button or menu. To learn how to expand a keyword see Keyword Expansion.
  • Keyboard Shortcut (optional): you can define a keyboard shortcut that, when invoked, the associated error handler template text is inserted in the code.

See Also:

Insert Exception / Error Handler

Predefined Variables

User-defined Variables