Make folly::format no longer crash on invalid format strings
authorTudor Bosman <tudorb@fb.com>
Sat, 16 May 2015 02:29:05 +0000 (19:29 -0700)
committerViswanath Sivakumar <viswanath@fb.com>
Wed, 20 May 2015 17:57:10 +0000 (10:57 -0700)
commit4ecf6e3f6d120907c0e32059a923d15cd6fcfedc
tree10bbc3a5079bde0861bad557e0456ead1fd23f6d
parent1ae1c1ff3f344c6c1cec8f4b78c725e8e4b9a134
Make folly::format no longer crash on invalid format strings

Summary:
Yes, ideally we'd detect this at compile time, but if we can't, causing a SEV1
is not the best way to do it.

format() now behaves like formatChecked(); the old API is maintained for
backwards compatibility, but deprecated.

Test Plan: format_test

Reviewed By: simpkins@fb.com

Subscribers: trunkagent, dpittman, jdelong, sdmich, net-systems@, dmitri, folly-diffs@, yfeldblum, andrii, mssarang, chalfant

FB internal diff: D2075829

Tasks: 7095768

Signature: t1:2075829:1431713985:b3fdec4820104b4ddc4be0b6af999db174a692d9
folly/Format-inl.h
folly/Format.h
folly/test/FormatTest.cpp