17.05.2015 Views

zl:1 - FTP

zl:1 - FTP

zl:1 - FTP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

619 dbg :with-erri ng-frame<br />

You also use sys:with-aborts-enabled when you don't need the automatic<br />

sys:without-aborts created by unwind-protect. For example,<br />

(unwind-protect (do-something)<br />

(sys:with-aborts-enabled (unwind-protect)<br />

(clean-up-something»)<br />

If the cleanup form contained an explicit sys:without-aborts, to specify. a<br />

specific reason why it should not be aborted instead of the default generic<br />

reason, the sys:with-aborts-enabled must specify the identifiers of both the<br />

explicit and the implicit sys:without-aborts. For example,<br />

(unwind-protect (do-something)<br />

(sys:without-aborts<br />

(faa HThe floor is being cleaned up.<br />

Aborting now could leave a serious mess that will cause<br />

trouble if you enter this room again later. H )<br />

(do-something-not-abortable)<br />

(sys:with-aborts-enabled (faa unwind-protect)<br />

(do-something-abortable»»<br />

See the macro sys:without-aborts, page 620.<br />

For a table of related items: See the section "Nonlocal Exit Functions" in<br />

Symbolics Common Lisp: Language Concepts.<br />

dbg:with-erring-frame (frame-uar condition) &body body Macro<br />

dbg:with-erring-frame sets up an environment with appropriate bindings<br />

for using the rest of the functions that examine the stack. It binds<br />

frame-uar with the frame pointer to the stack frame that signalled the error.<br />

frame-uar is always a pointer to an interesting stack frame.<br />

condition is the condition object for the error, which was the first argument<br />

given to the condition-bind handler.<br />

(defun my-handler (condition-object)<br />

(dbg:with-erring-frame (frame-ptr condition-object)<br />

body ... ) )<br />

Inside body, the variable frame-var is bound to the frame pointer of the<br />

frame that got the error.<br />

Sometimes, you might want to use the special variable<br />

dbg:*current-frame* as frame-uar because some functions expect this special<br />

variable to be bound to the stack frame that signalled the error.<br />

You would use this special variable if you are sending the<br />

:bug-report-description message to the condition object, which calls stack-<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!