Boost logo

Boost :

From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-04-14 09:34:56


Thank you very much Olivier, I start to really appreciate your solution even
if the interface of the current_exception and copy_exception functions
change.

The main question of the mail has not yet a response. Olivier?

_____________________
Vicente Juan Botet Escriba

----- Original Message -----
From: "Kowalke Oliver (QD IT PA AS)" <Oliver.Kowalke_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, April 14, 2008 2:53 PM
Subject: Re: [boost] Has someone any plans to submit a exception_ptrlibrary
to Boost?

I'm sorry - the exception_ptr_impl.hpp needs a modification (case where no
user defined types are passed). Now it's corrected.
Oliver

/***************************************************************************
 * Copyright (C) 2008 by Oliver Kowalke *
 * kowalke_at_drslx002 *
 * *
 * This program is free software; you can redistribute it and/or modify *
 * it under the terms of the GNU General Public License as published by *
 * the Free Software Foundation; either version 2 of the License, or *
 * (at your option) any later version. *
 * *
 * This program is distributed in the hope that it will be useful, *
 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
 * GNU General Public License for more details. *
 * *
 * You should have received a copy of the GNU General Public License *
 * along with this program; if not, write to the *
 * Free Software Foundation, Inc., *
 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
 ***************************************************************************/#ifdef HAVE_CONFIG_H#include <config.h>#endif#include <iostream>#include <cstdlib>#include <stdexcept>#include <boost/bind.hpp>#include <boost/mpl/vector.hpp>#include <boost/thread.hpp>#include <future.hpp>struct X{ std::string msg; X( std::string const& msg_) : msg( msg_) {}};int add( int a, int b){ throw X("X error"); return a + b; }void execute( boost::function< void() > fn){ fn(); }int main( int argc, char *argv[]){ try { boost::promise< int > p; boost::future_wrapper< int, boost::mpl::vector< X > >wrapper( // boost::future_wrapper< int > wrapper( boost::bind( add, 11, 13), p); boost::future< int > f( p); boost::thread t( bo
 ost::bind( & execute, wrapper) ); std::cout << "add = " << f.get() << std::endl; return EXIT_SUCCESS; } catch ( X const& x) { std::cerr << x.msg << std::endl; } catch ( std::exception const& e) { std::cerr << e.what() << std::endl; } catch ( ... ) { std::cerr << "unhandled exception" << std::endl; } return EXIT_FAILURE;}--------------------------------------------------------------------------------> _______________________________________________> Unsubscribe & other changes:http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk