factor/basis/unix/debugger/debugger.factor

19 lines
557 B
Factor
Raw Normal View History

2008-12-08 17:02:31 -05:00
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
2008-12-08 19:48:35 -05:00
USING: debugger prettyprint accessors unix io kernel ;
2008-12-08 17:02:31 -05:00
IN: unix.debugger
M: unix-error error.
"Unix system call failed:" print
nl
dup message>> write " (" write errno>> pprint ")" print ;
M: unix-system-call-error error.
"Unix system call ``" write dup word>> pprint "'' failed:" print
nl
dup message>> write " (" write dup errno>> pprint ")" print
nl
"It was called with the following arguments:" print
nl
args>> stack. ;