Share via


Error Syntax for Tools

Home Page (Customizing)OverviewHow Do I ... Topics

When you select the Use Output Window check box for a tool on the Tools tab of the Customize dialog box (Tools menu, Customize command), the Output window’s error parser interprets the output of the tool. You can jump to source-code syntax errors directly from the error list in the Output window.

The Find In Files dialog box also uses the error parser. For example, you can double-click any output line from a Find In Files operation to jump to the referenced file and line.

The error parser detects filenames, errors, and line-number information of output strings, and makes each line in the file a hot link to the specified file and line number. For example, you can double-click an error line in the Output window that contains the error number, filename, and line number where the error occurred, and jump directly to the referenced line in the correct source file.

When you create your own tools, you should use the following error syntax so that the error parser can interpret the output correctly (+ denotes one or more; * denotes zero or more):

Error Type Description
error_string file_spec error_spec (STRING | file_spec STRING)
file_spec FILENAME ‘(‘line_spec’)’ ’:’
line_spec NUMBER | NUMBER ‘-’ NUMBER
error_spec ERRORKEYWORD ERRORNUMBER ‘:’

where:
   STRING Null-terminated string
   FILENAME Valid file specification and text file
   NUMBER {1–9}{0–9}*
   ERRORNUMBER {A–Z}+{0–9}{0–9}{0–9}{0–9}
   ERRORKEYWORD “error” | “warning” | “fatal error”

Note   Although the error number is part of this syntax, it is optional and not really useful to any tool except internal build tools.

What do you want to do?

Customize the Tools menu

Learn about argument macros for tools