[clojure-contrib commit] r945 - Auto-documentation for contrib version r944

0 views
Skip to first unread message

codesite...@google.com

unread,
Jun 16, 2009, 1:25:33 AM6/16/09
to clojure...@googlegroups.com
Author: tomfaulhaber
Date: Mon Jun 15 22:12:56 2009
New Revision: 945

Modified:
wiki/ApiDocIndex.json
wiki/ApiDocIndex.wiki
wiki/ConditionApiDoc.wiki
wiki/OverviewOfContrib.wiki

Log:
Auto-documentation for contrib version r944


Modified: wiki/ApiDocIndex.json
==============================================================================
--- wiki/ApiDocIndex.json (original)
+++ wiki/ApiDocIndex.json Mon Jun 15 22:12:56 2009
@@ -60,7 +60,7 @@
"name":"clojure.contrib.condition",
"author":"Stephen C. Gilardi",
"doc":
- "Flexible raising and handling of conditions. A condition is a
map\ncontaining:\n\n - keys and values specified as arguments to raise,
and\n - a stack trace at key :stack-trace.\n\nNote: requires AOT
compilation.\n\nBased on an idea from
Chouser:\nhttp://groups.google.com/group/clojure/browse_frm/thread/da1285c538f22bb5"},
+ "Flexible raising and handling of
conditions:\n\nFunctions:\n\n raise: raises a
condition\n handler-case: dispatches raised conditions to appropriate
handlers\n print-stack-trace: prints abbreviated or full condition stack
traces\n\nData:\n\n A condition is a map containing values for these
keys:\n\n - :type, a condition type specifier, typically a keyword\n
- :stack-trace, a stack trace to the site of the raise\n - :message, a
human-readable message (optional)\n - :cause, a wrapped exception or
condition (optional)\n - other keys given as arguments to raise
(optional)\n\nNote: requires AOT compilation.\n\nBased on an idea from
Chouser:\nhttp://groups.google.com/group/clojure/browse_frm/thread/da1285c538f22bb5"},
{"source-url":
"http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition/Condition.clj",
"wiki-url":
@@ -929,7 +929,7 @@
"doc":
"Takes a binding-form and a set of test/expr pairs. Evaluates each
test\n one at a time. If a test returns logical true, cond-let evaluates
and\n returns expr with binding-form bound to the value of test and
doesn't\n evaluate any of the other tests or exprs. To provide a default
value\n either provide a literal that evaluates to logical true and is\n
binding-compatible with binding-form, or use :else as the test and don't\n
refer to any parts of binding-form in the expr. (cond-let binding-form)\n
returns nil."},
{"source-url":
- "http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#54",
+ "http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#56",
"wiki-url":
"http://code.google.com/p/clojure-contrib/wiki/ClojureContribConditionApiDoc#*_full-stack-traces_*",
"namespace":"clojure.contrib.condition",
@@ -937,25 +937,25 @@
"doc":
"Bind to true to include clojure.{core,lang,main} frames in stack\n
traces"},
{"source-url":
- "http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#69",
+ "http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#71",
"wiki-url":
"http://code.google.com/p/clojure-contrib/wiki/ClojureContribConditionApiDoc#handler-case",
"namespace":"clojure.contrib.condition",
"name":"handler-case",
"arglists":[["dispatch-fn", "&", "body"]],
"doc":
- "Executes body in a context where raised conditions can be
handled.\n\n dispatch-fn accepts a raised condition (a map) and returns a
selector\n used to choose a handler.\n\n Handlers are forms within
body:\n\n (handle key\n ...)\n\n If a condition is raised,
executes the body of the first handler whose\n key satisfies (isa?
selector key). If no handlers match, re-raises the\n condition.\n\n While
a handler is running, *condition* is bound to the condition being\n
handled and *selector* is bound to to the value returned by dispatch-fn\n
that matched the handler's key."},
+ "Executes body in a context where raised conditions can be
handled.\n\n dispatch-fn accepts a raised condition (a map) and returns a
selector\n used to choose a handler. Commonly, dispatch-fn will be :type
to dispatch\n on the condition's :type value.\n\n Handlers are forms
within body:\n\n (handle key\n ...)\n\n If a condition is raised,
executes the body of the first handler whose\n key satisfies (isa?
selector key). If no handlers match, re-raises the\n condition.\n\n While
a handler is running, *condition* is bound to the condition being\n
handled and *selector* is bound to to the value returned by dispatch-fn\n
that matched the handler's key."},
{"source-url":
- "http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#103",
+ "http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#128",
"wiki-url":
"http://code.google.com/p/clojure-contrib/wiki/ClojureContribConditionApiDoc#print-stack-trace",
"namespace":"clojure.contrib.condition",
"name":"print-stack-trace",
- "arglists":[["condition"]],
+ "arglists":[["x"]],
"doc":
- "Prints the stack trace for a condition. Skips frames for classes in\n
clojure.{core,lang,main} unless the *full-stack-traces* is bound to\n
logical true"},
+ "Prints a stack trace for a condition or Throwable. Skips frames for\n
classes in clojure.{core,lang,main} unless the *full-stack-traces* is\n
bound to logical true"},
{"source-url":
- "http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#58",
+ "http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#60",
"wiki-url":
"http://code.google.com/p/clojure-contrib/wiki/ClojureContribConditionApiDoc#raise",
"namespace":"clojure.contrib.condition",
@@ -963,6 +963,14 @@
"arglists":[[], ["m"], ["key", "val", "&", "keyvals"]],
"doc":
"Raises a condition. With no arguments, re-raises the current
condition.\n With one argument (a map), raises the argument. With two or
more\n arguments, raises a map with keys and values from the arguments."},
+ {"source-url":
+ "http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#106",
+ "wiki-url":
+ "http://code.google.com/p/clojure-contrib/wiki/ClojureContribConditionApiDoc#stack-trace-info",
+ "namespace":"clojure.contrib.condition",
+ "name":"stack-trace-info",
+ "doc":
+ "Returns header, stack-trace, and cause info from conditions and\n
Throwables"},
{"source-url":
"http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condt.clj#31",
"wiki-url":

Modified: wiki/ApiDocIndex.wiki
==============================================================================
--- wiki/ApiDocIndex.wiki (original)
+++ wiki/ApiDocIndex.wiki Mon Jun 15 22:12:56 2009
@@ -509,7 +509,7 @@
[ReplLnApiDoc#print-repl-info print-repl-info] function
repl-ln Prints info about the current repl.
[SqlApiDoc#print-sql-exception print-sql-exception] function
sql.internal Prints the contents of an SQLException to stream.
[SqlApiDoc#print-sql-exception-chain print-sql-exception-chain]
function sql.internal Prints a chain of SQLExceptions to stream.
-[ConditionApiDoc#print-stack-trace print-stack-trace]
function condition Prints the stack trace for a condition.
Skips fram...
+[ConditionApiDoc#print-stack-trace print-stack-trace]
function condition Prints a stack trace for a condition or
Throwable....
[StacktraceApiDoc#print-stack-trace print-stack-trace]
function stacktrace Prints a Clojure-oriented stack trace of
tr, a Thr...
[ProfileApiDoc#print-summary print-summary] function
profile Prints a table of the results returned by summariz...
[TestIsApiDoc#print-tap-diagnostic print-tap-diagnostic]
function test-is.tap Prints a TAP diagnostic line. data is a
(possibly...
@@ -640,6 +640,7 @@
[GenericMathFunctionsApiDoc#sqr sqr]
multimethod generic.math-functions Return the square of x..
[GenericMathFunctionsApiDoc#sqrt sqrt]
multimethod generic.math-functions Return the sqrt of x..
[MathApiDoc#sqrt sqrt] multimethod
math Square root, but returns exact number if possible..
+[ConditionApiDoc#stack-trace-info stack-trace-info]
multimethod condition Returns header, stack-trace, and cause info
from c...
[ReplUtilsApiDoc#start-handling-break start-handling-break]
function repl-utils Register INT signal handler. After calling
this, ...
[MonadsApiDoc#state-m state-m] var
monads Monad describing stateful computations. The monadi...
[MonadsApiDoc#state-t state-t] function
monads Monad transformer that transforms a monad m into a...

Modified: wiki/ConditionApiDoc.wiki
==============================================================================
--- wiki/ConditionApiDoc.wiki (original)
+++ wiki/ConditionApiDoc.wiki Mon Jun 15 22:12:56 2009
@@ -17,11 +17,23 @@
(:require clojure.contrib.condition))
}}}
==Overview==
-<pre> Flexible raising and handling of conditions. A condition is a map
-containing:
+<pre> Flexible raising and handling of conditions:

- - keys and values specified as arguments to raise, and
- - a stack trace at key :stack-trace.
+Functions:
+
+ raise: raises a condition
+ handler-case: dispatches raised conditions to appropriate handlers
+ print-stack-trace: prints abbreviated or full condition stack traces
+
+Data:
+
+ A condition is a map containing values for these keys:
+
+ - :type, a condition type specifier, typically a keyword
+ - :stack-trace, a stack trace to the site of the raise
+ - :message, a human-readable message (optional)
+ - :cause, a wrapped exception or condition (optional)
+ - other keys given as arguments to raise (optional)

Note: requires AOT compilation.

@@ -31,7 +43,7 @@

==Public Variables and Functions==
Shortcuts:
-[#*_full-stack-traces_* *full-stack-traces*] [#handler-case handler-case]
[#print-stack-trace print-stack-trace] [#raise raise]
+[#*_full-stack-traces_* *full-stack-traces*] [#handler-case handler-case]
[#print-stack-trace print-stack-trace] [#raise raise] [#stack-trace-info
stack-trace-info]

----
===`*`full-stack-traces`*`===
@@ -39,7 +51,7 @@
<pre> Bind to true to include clojure.{core,lang,main} frames in stack
traces</pre>

-[http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#54
Source]
[http://www.google.com/codesearch?hl=en&lr=&q=*full-stack-traces*+package%3Ahttp%3A%2F%2Fclojure-contrib\.googlecode\.com&sbtn=Search
Search
for references in contrib]
+[http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#56
Source]
[http://www.google.com/codesearch?hl=en&lr=&q=*full-stack-traces*+package%3Ahttp%3A%2F%2Fclojure-contrib\.googlecode\.com&sbtn=Search
Search
for references in contrib]
----
===handler-case===
====macro====
@@ -49,7 +61,8 @@
<pre> Executes body in a context where raised conditions can be handled.

dispatch-fn accepts a raised condition (a map) and returns a selector
-used to choose a handler.
+used to choose a handler. Commonly, dispatch-fn will be :type to dispatch
+on the condition's :type value.

Handlers are forms within body:

@@ -64,18 +77,18 @@
handled and `*`selector`*` is bound to to the value returned by dispatch-fn
that matched the handler's key.</pre>

-[http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#69
Source]
[http://www.google.com/codesearch?hl=en&lr=&q=handler-case+package%3Ahttp%3A%2F%2Fclojure-contrib\.googlecode\.com&sbtn=Search
Search
for references in contrib]
+[http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#71
Source]
[http://www.google.com/codesearch?hl=en&lr=&q=handler-case+package%3Ahttp%3A%2F%2Fclojure-contrib\.googlecode\.com&sbtn=Search
Search
for references in contrib]
----
===print-stack-trace===
====function====
<pre>
-Usage: *(_print-stack-trace_ condition)*
+Usage: *(_print-stack-trace_ x)*
</pre>
-<pre> Prints the stack trace for a condition. Skips frames for classes in
-clojure.{core,lang,main} unless the `*`full-stack-traces`*` is bound to
-logical true</pre>
+<pre> Prints a stack trace for a condition or Throwable. Skips frames for
+classes in clojure.{core,lang,main} unless the `*`full-stack-traces`*` is
+bound to logical true</pre>

-[http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#103
Source]
[http://www.google.com/codesearch?hl=en&lr=&q=print-stack-trace+package%3Ahttp%3A%2F%2Fclojure-contrib\.googlecode\.com&sbtn=Search
Search
for references in contrib]
+[http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#128
Source]
[http://www.google.com/codesearch?hl=en&lr=&q=print-stack-trace+package%3Ahttp%3A%2F%2Fclojure-contrib\.googlecode\.com&sbtn=Search
Search
for references in contrib]
----
===raise===
====macro====
@@ -88,4 +101,12 @@
With one argument (a map), raises the argument. With two or more
arguments, raises a map with keys and values from the arguments.</pre>

-[http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#58
Source]
[http://www.google.com/codesearch?hl=en&lr=&q=raise+package%3Ahttp%3A%2F%2Fclojure-contrib\.googlecode\.com&sbtn=Search
Search
for references in contrib]
+[http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#60
Source]
[http://www.google.com/codesearch?hl=en&lr=&q=raise+package%3Ahttp%3A%2F%2Fclojure-contrib\.googlecode\.com&sbtn=Search
Search
for references in contrib]
+----
+===stack-trace-info===
+====multimethod====
+_No usage documentation available_
+<pre> Returns header, stack-trace, and cause info from conditions and
+Throwables</pre>
+
+[http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/condition.clj#106
Source]
[http://www.google.com/codesearch?hl=en&lr=&q=stack-trace-info+package%3Ahttp%3A%2F%2Fclojure-contrib\.googlecode\.com&sbtn=Search
Search
for references in contrib]

Modified: wiki/OverviewOfContrib.wiki
==============================================================================
--- wiki/OverviewOfContrib.wiki (original)
+++ wiki/OverviewOfContrib.wiki Mon Jun 15 22:12:56 2009
@@ -111,18 +111,30 @@
by Stephen C. Gilardi<br>
API Overview [ConditionApiDoc here]

-<pre> Flexible raising and handling of conditions. A condition is a map
-containing:
+<pre> Flexible raising and handling of conditions:

- - keys and values specified as arguments to raise, and
- - a stack trace at key :stack-trace.
+Functions:
+
+ raise: raises a condition
+ handler-case: dispatches raised conditions to appropriate handlers
+ print-stack-trace: prints abbreviated or full condition stack traces
+
+Data:
+
+ A condition is a map containing values for these keys:
+
+ - :type, a condition type specifier, typically a keyword
+ - :stack-trace, a stack trace to the site of the raise
+ - :message, a human-readable message (optional)
+ - :cause, a wrapped exception or condition (optional)
+ - other keys given as arguments to raise (optional)

Note: requires AOT compilation.

Based on an idea from Chouser:

http://groups.google.com/group/clojure/browse`_`frm/thread/da1285c538f22bb5</pre>
Public Variables and Functions:
-[ConditionApiDoc#*_full-stack-traces_* *full-stack-traces*]
[ConditionApiDoc#handler-case handler-case]
[ConditionApiDoc#print-stack-trace print-stack-trace]
[ConditionApiDoc#raise raise]
+[ConditionApiDoc#*_full-stack-traces_* *full-stack-traces*]
[ConditionApiDoc#handler-case handler-case]
[ConditionApiDoc#print-stack-trace print-stack-trace]
[ConditionApiDoc#raise raise] [ConditionApiDoc#stack-trace-info
stack-trace-info]

----
===condt===

Reply all
Reply to author
Forward
0 new messages