Fix catch usage in cont-responder examples
parent
29190ebc3e
commit
6b4227b022
|
@ -119,10 +119,10 @@ USE: sequences
|
|||
"browser" "responder" set
|
||||
<table border= "1" table>
|
||||
<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> <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>
|
||||
</table>
|
||||
] bind ;
|
||||
|
@ -229,9 +229,8 @@ USE: sequences
|
|||
[
|
||||
[
|
||||
run-eval-requester
|
||||
] [
|
||||
dup [ show-message-page ] [ drop ] ifte
|
||||
] catch
|
||||
dup [ show-message-page ] [ drop ] ifte
|
||||
] forever ;
|
||||
|
||||
"eval" [ [ ] "None" [ ] <evaluator> eval-responder ] install-cont-responder
|
||||
|
|
|
@ -50,5 +50,5 @@ USE: parser
|
|||
#! in factor core.
|
||||
"../../library/httpd/cont-responder.factor" run-file ;
|
||||
DEFER: la
|
||||
: la [ 8888 httpd ] [ dup . flush [ la ] when* ] catch ;
|
||||
: la 8888 httpd ;
|
||||
: lb [ la "httpd thread exited.\n" write flush ] in-thread ;
|
||||
|
|
Loading…
Reference in New Issue