Merge branch 'master' of git://factorcode.org/git/factor

db4
U-SLAVA-DFB8FF805\Slava 2008-05-06 04:27:01 -05:00
commit 541061d870
6 changed files with 13 additions and 15 deletions

View File

@ -39,7 +39,7 @@ IN: continuations.tests
"!!! The following error is part of the test" print
[ ] [ [ [ "2 car" ] eval ] [ print-error ] recover ] unit-test
[ ] [ [ [ "2 car" ] eval ] try ] unit-test
[ f throw ] must-fail

View File

@ -64,17 +64,13 @@ M: string error. print ;
[ global [ "Error in print-error!" print drop ] bind ]
recover ;
SYMBOL: error-hook
[
print-error
restarts.
nl
"Type :help for debugging help." print flush
] error-hook set-global
: try ( quot -- )
[ error-hook get call ] recover ;
[
print-error
restarts.
nl
"Type :help for debugging help." print flush
] recover ;
ERROR: assert got expect ;

View File

@ -51,6 +51,6 @@ IN: listener.tests
[
[ ] [
"IN: listener.tests : hello\n\"world\" ;" parse-interactive
drop
drop
] unit-test
] with-file-vocabs

View File

@ -43,9 +43,11 @@ M: object stream-read-quot
"( " in get " )" 3append
H{ { background { 1 0.7 0.7 1 } } } format bl flush ;
SYMBOL: error-hook
: listen ( -- )
listener-hook get call prompt.
[ read-quot [ try ] [ bye ] if* ]
[ read-quot [ [ error-hook get call ] recover ] [ bye ] if* ]
[
dup parse-error? [
error-hook get call

View File

@ -1,2 +1,2 @@
collections
collections sequences
sequences

View File

@ -128,7 +128,7 @@ TUPLE: stack-display ;
stack-display new
g workspace-listener swap [
dup <toolbar> f track,
listener-gadget-stack [ stack. ]
stack>> [ [ stack. ] curry try ]
t "Data stack" <labelled-pane> 1 track,
] { 0 1 } build-track ;