2 USING: help.markup help.syntax source-files.errors words io
3 compiler.errors classes ;
5 ARTICLE: "compiler-errors" "Compiler errors"
6 "After loading a vocabulary, you might see a message like:"
8 ":errors - print 2 compiler errors"
10 "This indicates that some words did not pass the stack checker. Stack checker error conditions are documented in " { $link "inference-errors" } ", and the stack checker itself in " { $link "inference" } "."
12 "Words to view errors:"
13 { $subsection :errors }
14 { $subsection :linkage }
15 "Compiler errors are reported using the " { $link "tools.errors" } " mechanism, and as a result, they are also are shown in the " { $link "ui.tools.error-list" } "." ;
18 { $values { "error" compiler-error } }
19 { $description "Saves the error for viewing with " { $link :errors } "." } ;
22 { $values { "error" linkage-error } { "word" word } { "class" class } }
23 { $description "Saves the error for viewing with " { $link :linkage } "." } ;
26 { $description "Prints all compiler errors." } ;
29 { $description "Prints all C library interface linkage errors." } ;
31 { :errors :linkage } related-words
34 { $values { "errors" "a sequence of " { $link source-file-error } " instances" } }
35 { $description "Prints a list of errors, grouped by source file." } ;
37 ARTICLE: "tools.errors" "Batch error reporting"
38 "Some tools, such as the " { $link "compiler" } ", " { $link "tools.test" } " and " { $link "help.lint" } " need to report multiple errors at a time. Each error is associated with a source file, line number, and optionally, a definition. " { $link "errors" } " cannot be used for this purpose, so the " { $vocab-link "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."
40 "Source file errors inherit from a class:"
41 { $subsection source-file-error }
42 "Printing an error summary:"
43 { $subsection error-summary }
44 "Printing a list of errors:"
45 { $subsection errors. }
46 "Batch errors are reported in the " { $link "ui.tools.error-list" } "." ;