Documentation fixes
parent
edc586e48b
commit
8aa676ab1e
|
@ -29,6 +29,7 @@ $nl
|
||||||
{ $subsection ignore-errors }
|
{ $subsection ignore-errors }
|
||||||
"Unhandled errors are reported in the listener and can be debugged using various tools. See " { $link "debugger" } "."
|
"Unhandled errors are reported in the listener and can be debugged using various tools. See " { $link "debugger" } "."
|
||||||
{ $subsection "errors-restartable" }
|
{ $subsection "errors-restartable" }
|
||||||
|
{ $subsection "debugger" }
|
||||||
{ $subsection "errors-post-mortem" }
|
{ $subsection "errors-post-mortem" }
|
||||||
"When Factor encouters a critical error, it calls the following word:"
|
"When Factor encouters a critical error, it calls the following word:"
|
||||||
{ $subsection die } ;
|
{ $subsection die } ;
|
||||||
|
|
|
@ -86,7 +86,15 @@ HELP: error-hook
|
||||||
|
|
||||||
HELP: try
|
HELP: try
|
||||||
{ $values { "quot" "a quotation" } }
|
{ $values { "quot" "a quotation" } }
|
||||||
{ $description "Calls the quotation. If it throws an error, calls " { $link error-hook } " with the error and restores the data stack." } ;
|
{ $description "Attempts to call a quotation; if it throws an error, the " { $link error-hook } " gets called, stacks are restored, and execution continues after the call to " { $link try } "." }
|
||||||
|
{ $examples
|
||||||
|
"The following example prints an error and keeps going:"
|
||||||
|
{ $code
|
||||||
|
"[ \"error\" throw ] try"
|
||||||
|
"\"still running...\" print"
|
||||||
|
}
|
||||||
|
{ $link "listener" } " uses " { $link try } " to recover from user errors."
|
||||||
|
} ;
|
||||||
|
|
||||||
HELP: expired-error.
|
HELP: expired-error.
|
||||||
{ $error-description "Thrown by " { $link alien-address } " and " { $link alien-invoke } " if an " { $link alien } " object passed in as a parameter has expired. Alien objects expire if they are saved an image which is subsequently loaded; this prevents a certain class of programming errors, usually attempts to use uninitialized objects, since holding a C address is meaningless between sessions." }
|
{ $error-description "Thrown by " { $link alien-address } " and " { $link alien-invoke } " if an " { $link alien } " object passed in as a parameter has expired. Alien objects expire if they are saved an image which is subsequently loaded; this prevents a certain class of programming errors, usually attempts to use uninitialized objects, since holding a C address is meaningless between sessions." }
|
||||||
|
|
|
@ -206,6 +206,7 @@ ARTICLE: "tools" "Developer tools"
|
||||||
{ $subsection "tools.vocabs" }
|
{ $subsection "tools.vocabs" }
|
||||||
"Exploratory tools:"
|
"Exploratory tools:"
|
||||||
{ $subsection "editor" }
|
{ $subsection "editor" }
|
||||||
|
{ $subsection "listener" }
|
||||||
{ $subsection "tools.crossref" }
|
{ $subsection "tools.crossref" }
|
||||||
{ $subsection "inspector" }
|
{ $subsection "inspector" }
|
||||||
"Debugging tools:"
|
"Debugging tools:"
|
||||||
|
|
|
@ -138,8 +138,7 @@ M: f print-element drop ;
|
||||||
link-style get [ write-object ] with-style ;
|
link-style get [ write-object ] with-style ;
|
||||||
|
|
||||||
: ($link) ( article -- )
|
: ($link) ( article -- )
|
||||||
dup article-name swap >link write-link
|
[ dup article-name swap >link write-link ] ($span) ;
|
||||||
span last-element set ;
|
|
||||||
|
|
||||||
: $link ( element -- )
|
: $link ( element -- )
|
||||||
first ($link) ;
|
first ($link) ;
|
||||||
|
|
Loading…
Reference in New Issue