Merge branch 'master' of git://factorcode.org/git/factor
commit
541061d870
|
@ -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
|
||||
|
||||
|
|
|
@ -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 ;
|
||||
|
||||
|
|
|
@ -51,6 +51,6 @@ IN: listener.tests
|
|||
[
|
||||
[ ] [
|
||||
"IN: listener.tests : hello\n\"world\" ;" parse-interactive
|
||||
drop
|
||||
drop
|
||||
] unit-test
|
||||
] with-file-vocabs
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
collections
|
||||
collections sequences
|
||||
sequences
|
||||
|
|
|
@ -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 ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue