Bug fixes
parent
598ba7dedb
commit
1b9d2478e3
|
@ -39,7 +39,7 @@ IN: continuations.tests
|
||||||
|
|
||||||
"!!! The following error is part of the test" print
|
"!!! 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
|
[ f throw ] must-fail
|
||||||
|
|
||||||
|
|
|
@ -64,17 +64,13 @@ M: string error. print ;
|
||||||
[ global [ "Error in print-error!" print drop ] bind ]
|
[ global [ "Error in print-error!" print drop ] bind ]
|
||||||
recover ;
|
recover ;
|
||||||
|
|
||||||
SYMBOL: error-hook
|
|
||||||
|
|
||||||
[
|
|
||||||
print-error
|
|
||||||
restarts.
|
|
||||||
nl
|
|
||||||
"Type :help for debugging help." print flush
|
|
||||||
] error-hook set-global
|
|
||||||
|
|
||||||
: try ( quot -- )
|
: try ( quot -- )
|
||||||
[ error-hook get call ] recover ;
|
[
|
||||||
|
print-error
|
||||||
|
restarts.
|
||||||
|
nl
|
||||||
|
"Type :help for debugging help." print flush
|
||||||
|
] recover ;
|
||||||
|
|
||||||
ERROR: assert got expect ;
|
ERROR: assert got expect ;
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,6 @@ IN: listener.tests
|
||||||
[
|
[
|
||||||
[ ] [
|
[ ] [
|
||||||
"IN: listener.tests : hello\n\"world\" ;" parse-interactive
|
"IN: listener.tests : hello\n\"world\" ;" parse-interactive
|
||||||
drop
|
drop
|
||||||
] unit-test
|
] unit-test
|
||||||
] with-file-vocabs
|
] with-file-vocabs
|
||||||
|
|
|
@ -43,9 +43,11 @@ M: object stream-read-quot
|
||||||
"( " in get " )" 3append
|
"( " in get " )" 3append
|
||||||
H{ { background { 1 0.7 0.7 1 } } } format bl flush ;
|
H{ { background { 1 0.7 0.7 1 } } } format bl flush ;
|
||||||
|
|
||||||
|
SYMBOL: error-hook
|
||||||
|
|
||||||
: listen ( -- )
|
: listen ( -- )
|
||||||
listener-hook get call prompt.
|
listener-hook get call prompt.
|
||||||
[ read-quot [ try ] [ bye ] if* ]
|
[ read-quot [ [ error-hook get call ] recover ] [ bye ] if* ]
|
||||||
[
|
[
|
||||||
dup parse-error? [
|
dup parse-error? [
|
||||||
error-hook get call
|
error-hook get call
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
collections
|
collections
|
||||||
collections sequences
|
sequences
|
||||||
|
|
|
@ -128,7 +128,7 @@ TUPLE: stack-display ;
|
||||||
stack-display new
|
stack-display new
|
||||||
g workspace-listener swap [
|
g workspace-listener swap [
|
||||||
dup <toolbar> f track,
|
dup <toolbar> f track,
|
||||||
listener-gadget-stack [ stack. ]
|
stack>> [ [ stack. ] curry try ]
|
||||||
t "Data stack" <labelled-pane> 1 track,
|
t "Data stack" <labelled-pane> 1 track,
|
||||||
] { 0 1 } build-track ;
|
] { 0 1 } build-track ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue