Boost C++ Libraries: Ticket #5604: Boost.Phoenix: Provide access to thrown exception in catch handler https://svn.boost.org/trac10/ticket/5604 <p> I've been using Phoenix (the one that came with 1.44 - that's Phoenix v2?) for a bit, as a Boost.Lambda replacement, mostly happily. But I've come across a scenario I don't think Phoenix caters for, namely accessing an exception from a catch_ body, something like this: </p> <pre class="wiki">std::vector&lt;std::string&gt; errors; using namespace boost::phoenix; using namespace boost::phoenix::arg_names; std::for_each(changes.begin(), changes.end(), try_ [ bind(&amp;SomeClass::AddChange, this, arg1, std::string()) ] .catch_&lt;std::runtime_error&gt;()` [ push_back(ref(errors), bind(&amp;std::runtime_error::what, /* Can I access the exception that's been thrown? */)) ]); </pre><p> I want to aggregate any error information thrown by <code>SomeClass::AddChange</code> in the <code>errors</code> vector, to be rethrown after the for_each. In Boost.Lambda, I'd be able to use the <code>_e</code> placeholder to access the exception object, but there seems to be no way of doing so in Phoenix? </p> <p> Adding a similar placeholder to give access to the exception object would be a very useful addition to Phoenix... </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5604 Trac 1.4.3 Thomas Heller Wed, 29 Jun 2011 16:16:05 GMT status, version, milestone changed https://svn.boost.org/trac10/ticket/5604#comment:1 https://svn.boost.org/trac10/ticket/5604#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.44.0</span> → <span class="trac-field-new">Boost 1.47.0</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.48.0</span> </li> </ul> Ticket Thomas Heller Sun, 09 Oct 2011 02:42:07 GMT milestone changed https://svn.boost.org/trac10/ticket/5604#comment:2 https://svn.boost.org/trac10/ticket/5604#comment:2 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.48.0</span> → <span class="trac-field-new">To Be Determined</span> </li> </ul> Ticket Kohei Takahashi <flast@…> Fri, 27 Mar 2015 08:54:41 GMT <link>https://svn.boost.org/trac10/ticket/5604#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5604#comment:3</guid> <description> <p> I implemented this feature and has been merged, see h ttps://github.com/boostorg/phoenix/pull/13. </p> </description> <category>Ticket</category> </item> <item> <author>John Fletcher <J.P.Fletcher@…></author> <pubDate>Sat, 28 Mar 2015 15:19:31 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5604#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5604#comment:4</guid> <description> <p> This is now on develop. It has missed the cutoff for Boost 1.58.0 but will be in the next release of Boost. Thanks to Kohei Takakashi </p> </description> <category>Ticket</category> </item> <item> <author>John Fletcher <J.P.Fletcher@…></author> <pubDate>Sat, 28 Mar 2015 15:23:29 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5604#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5604#comment:5</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/5604#comment:4" title="Comment 4">John Fletcher &lt;J.P.Fletcher@…&gt;</a>: </p> <blockquote class="citation"> <p> This is now on develop. It has missed the cutoff for Boost 1.58.0 but will be in the next release of Boost. Thanks to Kohei Takakashi </p> </blockquote> <p> Sorry, that should be Kohei Takahashi. </p> </description> <category>Ticket</category> </item> <item> <author>Braden McDaniel <braden@…></author> <pubDate>Sat, 26 Sep 2015 13:46:08 GMT</pubDate> <title>cc set https://svn.boost.org/trac10/ticket/5604#comment:6 https://svn.boost.org/trac10/ticket/5604#comment:6 <ul> <li><strong>cc</strong> <span class="trac-author">braden@…</span> added </li> </ul> Ticket Braden McDaniel <braden@…> Sat, 26 Sep 2015 13:52:13 GMT <link>https://svn.boost.org/trac10/ticket/5604#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5604#comment:7</guid> <description> <p> This doesn't appear to have made it into Boost 1.59.0, either. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Fletcher</dc:creator> <pubDate>Wed, 30 Sep 2015 10:17:11 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5604#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5604#comment:8</guid> <description> <p> This has now been moved to master and so will be in 1.60.0 </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Kohei Takahashi</dc:creator> <pubDate>Mon, 09 May 2016 13:47:07 GMT</pubDate> <title>status changed; resolution set; milestone deleted https://svn.boost.org/trac10/ticket/5604#comment:9 https://svn.boost.org/trac10/ticket/5604#comment:9 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-deleted">To Be Determined</span> </li> </ul> Ticket