0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd::fmt: Show demangled type name of faulty argument.

This commit is contained in:
Jason Volk 2017-09-08 01:58:59 -07:00
parent 4a24b57035
commit 277765ebbc

View file

@ -375,8 +375,9 @@ try
{ {
const auto &type(get<1>(val)); const auto &type(get<1>(val));
const auto &handler(*specifiers().at(spec.name)); const auto &handler(*specifiers().at(spec.name));
if(!handler(out, max, spec, val)) if(unlikely(!handler(out, max, spec, val)))
throw invalid_type("`%s' for format specifier '%s' for argument #%u", throw invalid_type("`%s' (%s) for format specifier '%s' for argument #%u",
demangle(type.name()),
type.name(), type.name(),
spec.name, spec.name,
idx); idx);