Commit 6f335237 authored by bsimmers's avatar bsimmers Committed by Peter Griess

Turn one more folly::format error into a fatal

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
parent 27ff9a4a
...@@ -121,7 +121,7 @@ class Formatter { ...@@ -121,7 +121,7 @@ class Formatter {
template <size_t K, class Callback> template <size_t K, class Callback>
typename std::enable_if<K == valueCount>::type typename std::enable_if<K == valueCount>::type
doFormatFrom(size_t i, FormatArg& arg, Callback& cb) const { 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> template <size_t K, class Callback>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment