Docs: source-files.errors

db4
Björn Lindqvist 2014-04-09 21:21:32 +02:00 committed by John Benediktsson
parent 8b4af6bc86
commit 7c9f106018
1 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,40 @@
USING: arrays help.markup help.syntax math kernel sequences ;
IN: source-files.errors
HELP: error-type-holder
{ $description "A definition of a class of errors"
$nl
"Instances contain the following slots:"
{ $table
{ { $slot "type" } { "symbol representing the error type." } }
{ { $slot "word" } { "name of the word that lists all errors of this error type." } }
{ { $slot "plural" } { "pluralized description of this error type." } }
{ { $slot "icon" } { "path to an icon image representing this error type." } }
{ { $slot "quot" } { "quotation that produces a list of all errors of this type." } }
{ { $slot "forget-quot" } { "a quotation that removes errors of this type for a given word." } }
{ { $slot "fatal?" } { "whether the error is fatal or not. default " { $snippet t } "." } }
}
} ;
HELP: error-counts
{ $values { "alist" "error types and counts" } }
{ $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." } ;
HELP: define-error-type
{ $values { "error-type" error-type-holder } }
{ $description "Registers a new error type." } ;
HELP: all-errors
{ $values { "errors" sequence } }
{ $description "Lists all errors in the system." } ;
HELP: error-file
{ $description "File in which the error occurred." } ;
HELP: <definition-error>
{ $values
{ "error" "an error." }
{ "definition" "an asset that contains the error." }
{ "class" "a tuple class deriving " { $snippet source-file-error } "." }
}
{ $description "Creates a new " { $snippet source-file-error } " instance." } ;