Making Optional throw exceptions instead of assert
authorTom Jackson <tjackson@fb.com>
Thu, 16 Jul 2015 20:59:07 +0000 (13:59 -0700)
committerSara Golemon <sgolemon@fb.com>
Mon, 20 Jul 2015 19:26:31 +0000 (12:26 -0700)
commit22e8caf3c6a8429303e447a9988b094accbbbb30
tree193860b1d64667a8bcd85bae2dcac5e7d3978541
parent59bdbbcce21b59a9659cac143ad663914692a499
Making Optional throw exceptions instead of assert

Summary: I'm upgrading assertions to throws, since these are fatal in all circumstances. If something is explicitly `Optional`, it makes sense to fail loudly if it is misused in this manner.

Reviewed By: @yfeldblum

Differential Revision: D2247612
folly/Optional.h
folly/test/OptionalTest.cpp