diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 93575d991a2..14c6468e3ae 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -1640,8 +1640,9 @@ std::string base64Decode(std::string_view s) if (c == '\n') continue; char digit = base64DecodeChars[(unsigned char) c]; - if (digit == npos) - throw Error("invalid character in Base64 string: '%c'", c); + if (digit == npos) { + throw Error("invalid character in Base64 string: '%c' in '%s'", c, s.data()); + } bits += 6; d = d << 6 | digit;