Boost logo

Boost Users :

Subject: Re: [Boost-users] boost exception question when threadinglibrary header is included.
From: Robert Ramey (ramey_at_[hidden])
Date: 2011-06-10 12:29:58


Lars Viklund wrote:
> On Thu, Jun 09, 2011 at 10:25:51PM -0800, Robert Ramey wrote:

> By "trap an exception", do you refer to some capability of breaking
> when any exception is thrown or just uncaught ones?

It is my custom when running my projects to set the IDE so it traps
in the debugger any time an exception is thrown. Since I only throw
and exception when I have an error, this only happens when I have
a bug.

> Exceptions are part of normal C++ life, they do and will occur during
> the natural execution of programs, no matter what your philosophy on
> them are. If I configure the IDE to break whenever an exception is
> thrown and caught, I'd never get anywhere.

I don't know how to respond to this.

> Does this have any effects that you want to avoid? Do you want someone
> to investigate why an exception is thrown in the first place?

How can just including a header invoke an exception - before main(..) is
even called and not have it be a bug?

>> Here is a small test which you can use to demonstrate the problem
>>
>> #include <boost/thread.hpp>
>> int main(int argc, char * argv[]){
>> return 0;
>> }

Where is the bug in the above test program?

Robert Ramey


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net