Fix catch usage in cont-responder examples

cvs
Chris Double 2005-09-21 02:10:51 +00:00
parent 29190ebc3e
commit 6b4227b022
2 changed files with 4 additions and 5 deletions

View File

@ -119,10 +119,10 @@ USE: sequences
"browser" "responder" set "browser" "responder" set
<table border= "1" table> <table border= "1" table>
<tr> <th colspan= "2" th> "Source" write </th> </tr> <tr> <th colspan= "2" th> "Source" write </th> </tr>
<tr> <td colspan= "2" td> [ [ parse ] [ [ "No such word" write ] [ car see ] ifte ] catch ] with-simple-html-output </td> </tr> <tr> <td colspan= "2" td> [ [ parse ] catch [ "No such word" write ] [ car see ] ifte ] with-simple-html-output </td> </tr>
<tr> <th> "Apropos" write </th> <th> "Usages" write </th> </tr> <tr> <th> "Apropos" write </th> <th> "Usages" write </th> </tr>
<tr> <td valign= "top" td> [ apropos ] with-simple-html-output </td> <tr> <td valign= "top" td> [ apropos ] with-simple-html-output </td>
<td valign= "top" td> [ [ parse ] [ [ "No such word" write ] [ car usages. ] ifte ] catch ] with-simple-html-output </td> <td valign= "top" td> [ [ parse ] catch [ "No such word" write ] [ car usages. ] ifte ] with-simple-html-output </td>
</tr> </tr>
</table> </table>
] bind ; ] bind ;
@ -229,9 +229,8 @@ USE: sequences
[ [
[ [
run-eval-requester run-eval-requester
] [
dup [ show-message-page ] [ drop ] ifte
] catch ] catch
dup [ show-message-page ] [ drop ] ifte
] forever ; ] forever ;
"eval" [ [ ] "None" [ ] <evaluator> eval-responder ] install-cont-responder "eval" [ [ ] "None" [ ] <evaluator> eval-responder ] install-cont-responder

View File

@ -50,5 +50,5 @@ USE: parser
#! in factor core. #! in factor core.
"../../library/httpd/cont-responder.factor" run-file ; "../../library/httpd/cont-responder.factor" run-file ;
DEFER: la DEFER: la
: la [ 8888 httpd ] [ dup . flush [ la ] when* ] catch ; : la 8888 httpd ;
: lb [ la "httpd thread exited.\n" write flush ] in-thread ; : lb [ la "httpd thread exited.\n" write flush ] in-thread ;