]> gitweb.factorcode.org Git - factor.git/commitdiff
Docs: source-files.errors
authorBjörn Lindqvist <bjourne@gmail.com>
Wed, 9 Apr 2014 19:21:32 +0000 (21:21 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 14 Apr 2014 15:42:09 +0000 (08:42 -0700)
core/source-files/errors/errors-docs.factor [new file with mode: 0644]

diff --git a/core/source-files/errors/errors-docs.factor b/core/source-files/errors/errors-docs.factor
new file mode 100644 (file)
index 0000000..3135148
--- /dev/null
@@ -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." } ;