$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r52520 - sandbox/task/boost/task
From: oliver.kowalke_at_[hidden]
Date: 2009-04-20 17:23:10
Author: olli
Date: 2009-04-20 17:23:09 EDT (Mon, 20 Apr 2009)
New Revision: 52520
URL: http://svn.boost.org/trac/boost/changeset/52520
Log:
* broken_task thrown in task::get()
Text files modified: 
   sandbox/task/boost/task/exceptions.hpp |     8 --------                                
   sandbox/task/boost/task/handle.hpp     |    15 +++++++++++++--                         
   2 files changed, 13 insertions(+), 10 deletions(-)
Modified: sandbox/task/boost/task/exceptions.hpp
==============================================================================
--- sandbox/task/boost/task/exceptions.hpp	(original)
+++ sandbox/task/boost/task/exceptions.hpp	2009-04-20 17:23:09 EDT (Mon, 20 Apr 2009)
@@ -44,14 +44,6 @@
         {}
 };
 
-class task_already_executed : public std::logic_error
-{
-public:
-    task_already_executed()
-	: std::logic_error("task already executed")
-	{}
-};
-
 class broken_task : public std::logic_error
 {
 public:
Modified: sandbox/task/boost/task/handle.hpp
==============================================================================
--- sandbox/task/boost/task/handle.hpp	(original)
+++ sandbox/task/boost/task/handle.hpp	2009-04-20 17:23:09 EDT (Mon, 20 Apr 2009)
@@ -12,6 +12,7 @@
 
 #include <boost/task/detail/interrupter.hpp>
 #include <boost/task/future.hpp>
+#include <boost/task/exceptions.hpp>
 
 namespace boost { namespace task
 {
@@ -74,7 +75,12 @@
         { return intr_.interruption_requested(); }
 
         R get()
-	{ return fut_.get(); }
+	{
+		try
+		{ return fut_.get(); }
+		catch ( broken_promise const&)
+		{ throw broken_task(); }
+	}
 
         bool is_ready() const
         { return fut_.is_ready(); }
@@ -158,7 +164,12 @@
         { return intr_.interruption_requested(); }
 
         void get()
-	{ fut_.get(); }
+	{
+		try
+		{ fut_.get(); }
+		catch ( broken_promise const&)
+		{ throw broken_task(); }
+	}
 
         bool is_ready() const
         { return fut_.is_ready(); }