Turn one more folly::format error into a fatal
authorbsimmers <bsimmers@fb.com>
Sat, 5 Oct 2013 02:46:40 +0000 (19:46 -0700)
committerPeter Griess <pgriess@fb.com>
Tue, 15 Oct 2013 01:47:04 +0000 (18:47 -0700)
Summary:
I missed this one in my original diff. It's a static property of the
format string and the number of arguments passed.

Test Plan:
automated tests. saw that my buggy format() call aborted instead of throwing an
exception

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D998409
@override-unit-failures

folly/Format.h

index 79a4e705e54c24ed541f947849d4689663befca3..c4e18f75f0de030fa07f35510191418307aee107 100644 (file)
@@ -121,7 +121,7 @@ class Formatter {
   template <size_t K, class Callback>
   typename std::enable_if<K == valueCount>::type
   doFormatFrom(size_t i, FormatArg& arg, Callback& cb) const {
-    arg.error("argument index out of range, max=", i);
+    LOG(FATAL) << arg.errorStr("argument index out of range, max=", i);
   }
 
   template <size_t K, class Callback>