1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors debugger continuations threads threads.private
4 io io.styles prettyprint kernel math.parser namespaces make ;
7 : error-in-thread. ( thread -- )
8 "Error in thread " write
12 ", " % dup quot>> unparse-short % ")" %
13 ] "" make swap write-object ":" print ;
15 M: thread error-in-thread ( error thread -- )
16 initial-thread get-global eq? [
20 error-thread get-global error-in-thread. nl
27 [ self error-in-thread stop ]
28 thread-error-hook set-global