Boost logo

Boost Users :

From: Lothar May (l-may_at_[hidden])
Date: 2007-11-30 20:35:24


Hi,

I'm still stuck with the uncaught exception, I have no idea what is
going wrong there. Does anyone have any hint on what I could check? I
tried to compile the corresponding code in Xcode (MacOS 10.5), and
there I'm getting hundreds of link warnings like

warning boost::detail::shared_count::~shared_count()has different
visibility (2) in /Users/l-may/projects/test/build/Debug/
libtest.a(justatest.o) and (1) in /Users/l-may/projects/test/obj/
testapp.build/Debug/testapp.build/Objects-normal/i386/test.o

Not sure whether this is related to the exception problem. Any help?

Best regards,

Lothar

On Nov 24, 2007, at 9:27 PM, Lothar May wrote:

> Hi,
>
> I have a strange problem that an exception thrown by a
> boost::filesystem directory_iterator is not caugth on MacOS X.
> Please consider the following code:
>
> ("const string &dir" is a parameter)
>
> bool retVal = true;
> try
> {
> directory_iterator i(dir);
> directory_iterator end;
>
> while (i != end)
> {
> // do something
> ++i;
> }
> } catch (...)
> {
> retVal = false;
> }
>
> While this works perfectly on Windows and Linux (the exception is
> caught fine), on MacOS I get the following:
>
> terminate called after throwing an instance of
> 'boost
> ::filesystem
> ::basic_filesystem_error<boost::filesystem::basic_path<std::string,
> boost::filesystem::path_traits> >'
> what(): boost::filesystem::basic_directory_iterator constructor
> Abort trap
>
> The program runs fine (withouth the trap) if I comment out the upper
> lines.
>
> I use the boost 1.34.0 lib built as universal binary on MacOS 10.5,
> according to the instructions at http://svn.boost.org/trac/boost/wiki/CMakeConfigAndBuild
>
> I link to the static non-debug mt version of boost_filesystem.
> Exceptions within my program are caught fine, just this boost
> exception is not caught. The program is also compiled as non-debug.
>
> Any help would be very much appreciated.
>
> Regards,
>
> Lothar


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