can now (return-from terrace-file)

0 views
Skip to first unread message

nall...@gmail.com

unread,
Jul 17, 2008, 9:08:06 AM7/17/08
to cl-terrace
you can now escape from a terrace file at any time by calling RETURN-
FROM with the block CL-TERRACE:TERRACE-FILE

eg:

(return-from terrace-file "my webpage")

...of course now that it's done I'm starting to think it would have
been wiser to make it a THROW block eg


(throw 'return-from-terrace-file "my webpage")

so you can get out from within a function... hrm...

nall...@gmail.com

unread,
Jul 17, 2008, 9:17:20 AM7/17/08
to cl-terrace

> ...of course now that it's done I'm starting to think it would have
> been wiser to make it a THROW block eg
>
>    (throw 'return-from-terrace-file "my webpage")
>
> so you can get out from within a function... hrm...

on second thought, no, that would lead to freakiness since there might
be calls to FUNCALL-FILE up the stack and it would be unpredictable
where you were going to return to in strange situations

you can always

(throw 'hunchentoot:handler-done "my webpage")

from within a function to simulate returning from the _top_level_
terrace file [the one handling the request]
Reply all
Reply to author
Forward
0 new messages