summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-11-19 21:04:49 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-11-19 21:04:49 -0800
commit50cbab589eb6e5b841dd2e916a1026f477b7be15 (patch)
tree03b7c6f09949fae488b37e88467ca334a2b30fa7 /txr.1
parentaacf701d451639f393d964e7bd60e18d24a7f68d (diff)
downloadtxr-50cbab589eb6e5b841dd2e916a1026f477b7be15.tar.gz
txr-50cbab589eb6e5b841dd2e916a1026f477b7be15.tar.bz2
txr-50cbab589eb6e5b841dd2e916a1026f477b7be15.zip
Diagnose undefined functions in trace.
* share/txr/stdlib/trace.tl (sys:trace): If symbol-function returns nil, throw exception. * txr.1: Document the behavior, along with return values of trace and untrace, and the tolerance of untrace to bad arguments.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.124
1 files changed, 23 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index 8b1b31eb..8e1d2dca 100644
--- a/txr.1
+++ b/txr.1
@@ -48586,11 +48586,19 @@ When
is called with one or more arguments, it considers each
argument to be the name of a global function. For each
function, it turns on tracing, if it is not already turned on.
+If an argument denotes a nonexistent function, or is invalid
+function name syntax,
+.code trace
+terminates by throwing an exception, without processing the
+subsequent arguments, or undoing the effects already applied
+due to processing the previous arguments.
When
.code trace
is called with no arguments, it lists the names of functions
-for which tracing is currently enabled.
+for which tracing is currently enabled. In other cases it
+returns
+.codn nil .
When
.code untrace
@@ -48603,6 +48611,13 @@ When
is called with no arguments, it disables tracing for all
functions.
+The
+.code untrace
+macro always returns
+.code nil
+and silently tolerates arguments which are not names of functions
+currently being traced.
+
Tracing a function consists of printing a message prior to entry into the
function indicating its name and arguments, and another message upon leaving
the function indicating its return value, which is syntactically correlated
@@ -48638,6 +48653,13 @@ will not show the destructured internal macro arguments, but only the
two arguments passed to the expander function: the whole form, and the
environment.
+The
+.code trace
+and
+.code untrace
+functions return
+.codn nil .
+
.SH* INTERACTIVE LISTENER
.SS* Overview