Make it work more generically
authorMarc Horowitz <mhorowitz@fb.com>
Mon, 11 Aug 2014 22:40:23 +0000 (15:40 -0700)
committerSara Golemon <sgolemon@fb.com>
Tue, 9 Sep 2014 21:22:23 +0000 (14:22 -0700)
commit924520acb44b5c1349c229ad1b1d3457605e83d9
treeb9622244b0f67aa3e5d49990a4907db67630a838
parentc715a583965f84f44aa4613c03b58e2a5c9d53c3
Make it work more generically

Summary:
Change the strategy here: provide a more generic interface
which can be used safely with any exception types, but operates more
efficiently for explicitly named types.  Update the callers to use the
new pattern, which mostly means get() and operator* are replaced with
other more generic methods.  (This diff was constructed by merging
D1490304D1501644, and D1500861.)

Test Plan:
run tests.  Run something which generates an exception
message, and make sure that message isn't "std::exception"

Reviewed By: marccelani@fb.com

Subscribers: ruibalp, mcduff, marccelani, hitesh, mshneer, rtgw-diffs@, alandau, bmatheny, adityab, wormhole-diffs@, bwester, njormrod

FB internal diff: D1517701
folly/ExceptionWrapper.h
folly/String.h
folly/test/ExceptionWrapperBenchmark.cpp
folly/test/ExceptionWrapperTest.cpp