Try::tryGetExceptionObject
authorYedidya Feldblum <yfeldblum@fb.com>
Wed, 7 Jun 2017 07:05:51 +0000 (00:05 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 7 Jun 2017 07:21:19 +0000 (00:21 -0700)
commit717713f2c8cc1c75cc883189139cd23be61f5525
tree0016f779ef2a3ae499c3fb7e4c83865663106012
parent3c7ee0d0b0174c3d5cbe22581201c8fbef666bdf
Try::tryGetExceptionObject

Summary:
[Folly] `Try::tryGetExceptionObject`.

If the `Try` has a `std::exception` for the non-template overload or a `From` where `is_convertible<From*, Ex*>` for the template overload parameterized by `typename Ex`, returns a pointer to it. Otherwise returns `nullptr`.

Reviewed By: spacedentist

Differential Revision: D5180848

fbshipit-source-id: b7593b7459259f9a1e1e78b36d548e55d086e722
folly/Try.h
folly/test/TryTest.cpp