[C++-sig] debuging

David Abrahams dave at boost-consulting.com
Mon Nov 25 19:22:18 CET 2002


David Abrahams <dave at boost-consulting.com> writes:

> "Bjorn Pettersen" <BPettersen at NAREX.com> writes:
>
>>> From: Mike Rovner [mailto:mike at bindkey.com] 
>>> 
>>> Howdy, folks.
>>> 
>>> How do you debug BPL applications?
>>> 
>>> I just got 'TypeError: bad argument type for built-in 
>>> operation' and have absolutely no idea what to do next.
>>
>> Sounds like you need to get the traceback... Here's how I do it (you'll
>> probably want to modify it to throw a more standard exception ;-)
>
> Wow, yeah! Throwing the result of a new-expression is a very bad
> practice!
>
> Anyway, I'd like to use a modified version of this code in the
> Boost.Python tests if you don't mind...
>
> OK with you, Bjorn?

Hmm, I tried to use it in libs/python/test/embedding.cpp, but couldn't
get it to work. It seems the standard traceback module can't be
accessed from an embedded application without some extra help, which I
can't figure out right now.

-- 
                       David Abrahams
   dave at boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution





More information about the Cplusplus-sig mailing list