]> gitweb.factorcode.org Git - factor.git/blob - basis/source-files/errors/debugger/debugger.factor
Update some copyright headers to follow the current convention
[factor.git] / basis / source-files / errors / debugger / debugger.factor
1 ! Copyright (C) 2010 Joe Groff.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors debugger io kernel make math.parser
4 prettyprint source-files.errors summary ;
5 IN: source-files.errors.debugger
6
7 CONSTANT: +listener-input+ "<Listener input>"
8
9 : error-location ( error -- string )
10     [
11         [ path>> [ % ] [ +listener-input+ % ] if* ]
12         [ line#>> [ ": " % # ] when* ] bi
13     ] "" make ;
14
15 M: source-file-error summary error>> summary ;
16
17 M: source-file-error error.
18     [ error-location print nl ]
19     [ asset>> [ "Asset: " write short. nl ] when* ]
20     [ error>> error. ]
21     tri ;