summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-01-14 07:22:41 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-01-14 07:22:41 -0800
commit4a2d84b3dcfed6226b95c4cc32dd3d58bc848868 (patch)
tree9dc2963031faf918fe550f6ce485d8807306edc0
parent39e8945ea0d268ddad1706423e62240fa56f767d (diff)
downloadtxr-4a2d84b3dcfed6226b95c4cc32dd3d58bc848868.tar.gz
txr-4a2d84b3dcfed6226b95c4cc32dd3d58bc848868.tar.bz2
txr-4a2d84b3dcfed6226b95c4cc32dd3d58bc848868.zip
* txr.1: Wrote missing documentation for throw, throwf and error.
-rw-r--r--ChangeLog4
-rw-r--r--txr.123
2 files changed, 27 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ecdf8971..fe500cfe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2014-01-14 Kaz Kylheku <kaz@kylheku.com>
+ * txr.1: Wrote missing documentation for throw, throwf and error.
+
+2014-01-14 Kaz Kylheku <kaz@kylheku.com>
+
* stream.c (stdio_seek): After a successful seek, discard the character
that may have been put back with unget_char.
diff --git a/txr.1 b/txr.1
index 1e7e5bb5..df8ef0dd 100644
--- a/txr.1
+++ b/txr.1
@@ -9377,6 +9377,29 @@ In other words, the following equivalences hold:
.SS Functions throw, throwf and error
+.TP
+Syntax:
+
+ (throw <symbol> . <args>)
+ (throwf <symbol> <format-string> . <format-args>)
+ (error <format-string> . <format-args>)
+
+.TP
+Description:
+
+These functions generate an exception. The throw and throwf functions generate
+an exception identified by <symbol>, whereas error throws an exception of
+type error. The call (error ...) can be regarded as a shorthand for
+(throwf 'error ...).
+
+The throw function takes zero or more additional arguments. These arguments
+become the arguments of a catch handler which takes the exception. The
+handler will have to be capable of accepting that number of arguments.
+
+The throwf and error functions generate an exception which has a single
+argument: a character string created by a formatted print to a string stream
+using the format string and additional arguments.
+
.SS Operator catch
.TP