[Openmcl-devel] restart cases not visible
Rick Taube
taube at uiuc.edu
Tue Apr 18 12:15:47 PDT 2006
Hi I cant figure out how i get restart-case :report choices listed in
openmcl 1.0. Ive tried formatting to explicit stream like *terminal-
io* and *standard-output* but never see my restarts listed. the test
does work in sbcl and clisp but maybe im not doing something
correctly. Whatever solution i need will eventually have to work
under a callback from a non-repl process.
thanks for any help
--rick
( defun foo (data )
(restart-case
(handler-bind
((error
#'(lambda (c)
(declare (ignore c))
(format t "~&> Caught error under RTS callback!~%")
(force-output)
)))
(eval data))
(abort-rts ()
:report "Abort RTS, stopping scheduler."
1 )
(flush-queue ()
:report "Flush pending events from scheduler."
2)
(remove-callback ()
:report "Remove callback function."
3)
(reset-callback (fn)
:report "Specify new callback function."
:interactive
(lambda ()
(format t "Enter a function of 3 args: ")
(multiple-value-list (eval (read *query-io*)))
4))
))
? (foo '(/ 1 0))
> Caught error under RTS callback!
> Error in process listener(1): DIVISION-BY-ZERO detected
> performing 'TRUNCATE on (1 0)
> While executing: CCL::DIVIDE-BY-ZERO-ERROR
> Type :POP to abort.
Type :? for other options.
1 > :?
(:V N FRAME-NUMBER) Return value <n> in frame <frame-number>
(:F N) Show backtrace frame <n>
(:C N) Choose restart <n>
(:B &OPTIONAL SHOW-FRAME-CONTENTS) backtrace
(:SET N FRAME VALUE) Set <n>th item of frame <frame> to <value>
:R list restarts
:Q return to toplevel
:GO continue
:POP exit current break loop
:? help
:PWD Print the pathame of the current directory
(:CD DIR) Change to directory DIR
(:PROC &OPTIONAL P) Show information about specified process <p>/all
processes
(:KILL P) Kill process whose name or ID matches <p>
(:Y &OPTIONAL P) Yield control of terminal-input to process
whose name or ID matches <p>, or to any process if <p> is null
1 >
More information about the Openmcl-devel
mailing list