]> gitweb.factorcode.org Git - factor.git/blob - basis/tools/errors/errors-docs.factor
96814169a58a304be85324b32e0d5cbe8025de9c
[factor.git] / basis / tools / errors / errors-docs.factor
1 IN: tools.errors
2 USING: help.markup help.syntax source-files.errors words io
3 compiler.errors classes strings ;
4
5 ARTICLE: "compiler-errors" "Compiler errors"
6 "After loading a vocabulary, you might see a message like:"
7 { $code
8     ":errors - print 2 compiler errors"
9 }
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" } "."
11 $nl
12 "Words to view errors:"
13 { $subsections
14     :errors
15     :linkage
16 }
17 "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
19 HELP: compiler-error
20 { $values { "error" compiler-error } }
21 { $description "Saves the error for viewing with " { $link :errors } "." } ;
22
23 HELP: linkage-error
24 { $values { "name" string } { "message" string } { "word" word } { "class" class } }
25 { $description "Saves the error for viewing with " { $link :linkage } "." } ;
26
27 HELP: :errors
28 { $description "Prints all compiler errors." } ;
29
30 HELP: :linkage
31 { $description "Prints all C library interface linkage errors." } ;
32
33 { :errors :linkage } related-words
34
35 HELP: errors.
36 { $values { "errors" "a sequence of " { $link source-file-error } " instances" } }
37 { $description "Prints a list of errors, grouped by source file." } ;
38
39 ARTICLE: "tools.errors" "Batch error reporting"
40 "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."
41 $nl
42 "Source file errors inherit from a class:"
43 { $subsections source-file-error }
44 "Printing an error summary:"
45 { $subsections error-summary }
46 "Printing a list of errors:"
47 { $subsections errors. }
48 "Batch errors are reported in the " { $link "ui.tools.error-list" } "." ;
49
50 ABOUT: "tools.errors"