Batch error reporting
Factor handbook > The implementation

Prev:Optimizing compiler

Some tools, such as the Optimizing compiler, Unit testing and Help lint tool need to report multiple errors at a time. Each error is associated with a source file, line number, and optionally, a definition. Exception handling cannot be used for this purpose, so the source-files.errors vocabulary provides an alternative mechanism. Note that the words in this vocabulary are used for implementation only; to actually list errors, consult the documentation for the relevant tools.

Source file errors inherit from a class:

Printing an error summary:
error-summary ( -- )

Printing a list of errors:
errors. ( errors -- )

Batch errors are reported in the UI error list tool.