Print call stack trace for thread errors

db4
Slava Pestov 2008-09-03 20:20:03 -05:00
parent e9877bf940
commit 15391abdd7
1 changed files with 5 additions and 2 deletions

View File

@ -10,14 +10,17 @@ IN: debugger.threads
dup id>> # dup id>> #
" (" % dup name>> % " (" % dup name>> %
", " % dup quot>> unparse-short % ")" % ", " % dup quot>> unparse-short % ")" %
] "" make swap write-object ":" print nl ; ] "" make swap write-object ":" print ;
M: thread error-in-thread ( error thread -- ) M: thread error-in-thread ( error thread -- )
initial-thread get-global eq? [ initial-thread get-global eq? [
die drop die drop
] [ ] [
global [ global [
error-thread get-global error-in-thread. print-error flush error-thread get-global error-in-thread. nl
print-error nl
:c
flush
] bind ] bind
] if ; ] if ;