diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-11-19 21:04:49 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-11-19 21:04:49 -0800 |
commit | 50cbab589eb6e5b841dd2e916a1026f477b7be15 (patch) | |
tree | 03b7c6f09949fae488b37e88467ca334a2b30fa7 /txr.1 | |
parent | aacf701d451639f393d964e7bd60e18d24a7f68d (diff) | |
download | txr-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.1 | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -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 |