Change some usages of catch to recover, and fix a help viewer bug
parent
88766ac2aa
commit
33088f70bb
|
@ -10,10 +10,10 @@ sequences vectors words ;
|
||||||
"/library/bootstrap/primitives.factor" run-resource
|
"/library/bootstrap/primitives.factor" run-resource
|
||||||
|
|
||||||
: parse-resource* ( path -- )
|
: parse-resource* ( path -- )
|
||||||
[ parse-resource ] catch [
|
[ parse-resource ] [
|
||||||
{ { "Parse file again" t } } condition drop
|
{ { "Parse file again" t } } condition drop
|
||||||
parse-resource*
|
parse-resource*
|
||||||
] when* ;
|
] recover ;
|
||||||
|
|
||||||
: if-arch ( arch seq -- )
|
: if-arch ( arch seq -- )
|
||||||
architecture get rot member?
|
architecture get rot member?
|
||||||
|
|
|
@ -84,6 +84,6 @@ parser sequences sequences-internals words ;
|
||||||
"Now, you can run ./f factor.image" print flush
|
"Now, you can run ./f factor.image" print flush
|
||||||
|
|
||||||
"factor.image" resource-path save-image
|
"factor.image" resource-path save-image
|
||||||
] catch [ print-error listener ] when*
|
] [ print-error listener ] recover
|
||||||
|
|
||||||
0 exit
|
0 exit
|
||||||
|
|
|
@ -22,7 +22,7 @@ TUPLE: help-gadget history ;
|
||||||
[
|
[
|
||||||
"Back" [ history-action go-back ] <bevel-button> ,
|
"Back" [ history-action go-back ] <bevel-button> ,
|
||||||
"Forward" [ history-action go-forward ] <bevel-button> ,
|
"Forward" [ history-action go-forward ] <bevel-button> ,
|
||||||
"Home" [ history-action go-home ] <bevel-button> ,
|
"Home" [ find-help-gadget go-home ] <bevel-button> ,
|
||||||
] make-toolbar ;
|
] make-toolbar ;
|
||||||
|
|
||||||
: <help-pane> ( -- gadget )
|
: <help-pane> ( -- gadget )
|
||||||
|
|
|
@ -196,7 +196,7 @@ SYMBOL: hWnd
|
||||||
|
|
||||||
{ [ t ] [ drop DefWindowProc ] }
|
{ [ t ] [ drop DefWindowProc ] }
|
||||||
} cond
|
} cond
|
||||||
] catch [ error. 0 ] when*
|
] [ error. 0 ] recover
|
||||||
] alien-callback ;
|
] alien-callback ;
|
||||||
|
|
||||||
: event-loop ( -- )
|
: event-loop ( -- )
|
||||||
|
|
Loading…
Reference in New Issue