|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-10-15 01:42:29
Mark Sheppard wrote:
> The backtrace was missing a frame....
>
> --- boost-jam-3.1.4.orig/compile.c 2003-10-13 17:22:45.000000000 +0100
> +++ boost-jam-3.1.4/compile.c 2003-10-13 17:20:21.000000000 +0100
> @@ -577,7 +577,7 @@
> printf( " )\n* %s %s\n", message, arg ? arg->string : "" );
> print_source_line( rule->procedure );
> printf( "see definition of rule '%s' being called\n", rule->name );
> - backtrace( frame->prev );
> + backtrace( frame );
> exit(1);
Mark,
unfortunately, I cannot immediately understand what frame is missed, can you
clarify.
And while we're at it, I must admit that I'm somewhat confusing with the way
argument mismatch is reported. For example, I get:
a.jam:8: in b
*** argument error
* rule a ( foo bar )
* called with: ( foo )
* missing argument bar
a.jam:4:see definition of rule 'a' being called
a.jam:13: in c
(builtin): in module scope
And what's confusing it that stacktrace is split in two part, and futher,
lines
a.jam:4:see definition of rule 'a' being called
a.jam:13: in c
Look like there are to be read together, and the the first one is also part of
backtrace.
Compare, for example, with Python output:
Traceback (most recent call last):
File "a.py", line 11, in ?
c()
File "a.py", line 9, in c
b()
File "a.py", line 6, in b
a("foo")
TypeError: a() takes exactly 2 arguments (1 given)
Possibly, the better output for bjam would be:
*** argument error
* rule a ( foo bar )
* called with: ( foo )
* missing argument bar
* see definition of rule 'a' at a.jam:4:
* Traceback follows
a.jam:8: in b
a.jam:13: in c
(builtin): in module scope
Opinions? It's not really critical, so if nobody else care I'll just forget
about it.
- Volodya
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk