2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-12 12:02:24 +00:00
Files
build/errors.jam
Dave Abrahams bc99a39bf0 some small progress made
[SVN r11760]
2001-11-21 04:47:44 +00:00

47 lines
1.3 KiB
Plaintext

# (C) Copyright David Abrahams 2001. Permission to copy, use, modify, sell and
# distribute this software is granted provided this copyright notice appears in
# all copies. This software is provided "as is" without express or implied
# warranty, and with no claim as to its suitability for any purpose.
# A utility rule used to report the including module when there is an error, so
# that editors may find it.
rule report-module ( prefix ? : suffix ? : frames ? )
{
frames ?= 1 ;
# We report some large line number so that emacs, etc., will at least locate the file.
ECHO $(prefix) [ modules.binding [ CALLER_MODULE $(frames) ] ] ":" line 99999 $(suffix) ;
}
rule backtrace
{
local digits = 1 2 3 4 5 6 7 8 9 ;
local bt = [ BACKTRACE ] ;
bt = $(bt[5-]) ;
while $(bt)
{
ECHO $(bt[1]):$(bt[2]): "in" $(bt[4]) ;
for local n in $(digits)
{
if $($(n))-is-not-empty
{
ECHO $($(n)) ;
}
}
digits = ;
bt = $(bt[5-]) ;
}
}
rule error
{
backtrace error: $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
EXIT ;
}
rule warning
{
backtrace warning: $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
}