]> gitweb.factorcode.org Git - factor.git/blob - core/source-files/errors/errors-docs.factor
help.markup: adding a $slots word to document slots, use it.
[factor.git] / core / source-files / errors / errors-docs.factor
1 USING: arrays help.markup help.syntax math kernel sequences ;
2 IN: source-files.errors
3
4 HELP: error-type-holder
5 { $description "A definition of a class of errors"
6   $nl
7   "Instances contain the following slots:"
8   { $slots
9     { "type" { "symbol representing the error type." } }
10     { "word" { "name of the word that lists all errors of this error type." } }
11     { "plural" { "pluralized description of this error type." } }
12     { "icon" { "path to an icon image representing this error type." } }
13     { "quot" { "quotation that produces a list of all errors of this type." } }
14     { "forget-quot" { "a quotation that removes errors of this type for a given word." } }
15     { "fatal?" { "whether the error is fatal or not. default " { $link t } "." } }
16   }
17 } ;
18
19 HELP: error-counts
20 { $values { "alist" "error types and counts" } }
21 { $description "Outputs an alist of error types and counts of the number of errors of that type. Only fatal errors and counts > 0 are included." } ;
22
23 HELP: define-error-type
24 { $values { "error-type" error-type-holder } }
25 { $description "Registers a new error type." } ;
26
27 HELP: all-errors
28 { $values { "errors" sequence } }
29 { $description "Lists all errors in the system." } ;
30
31 HELP: error-file
32 { $values { "error" "an error" } { "file" "a file path" } }
33 { $description "File in which the error occurred." } ;
34
35 HELP: new-source-file-error
36 { $values
37   { "error" "an error" }
38   { "asset" "an asset that contains the error" }
39   { "class" "a tuple class deriving source-file-error" }
40   { "source-file-error" source-file-error }
41 }
42 { $description "Creates a new " { $link source-file-error } " instance." } ;