uri: include the malformed url when throwing a parse error

This commit is contained in:
Danny Robson 2022-03-08 06:47:21 +10:00
parent cd42dc11b1
commit ea24909893

View File

@ -70,6 +70,10 @@ using cruft::uri;
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include <fmt/format.h>
//-----------------------------------------------------------------------------
void void
cruft::uri::parse (void) cruft::uri::parse (void)
{ {
@ -97,5 +101,5 @@ cruft::uri::parse (void)
%%write exec; %%write exec;
if (!__success) if (!__success)
throw parse_error ("invalid uri"); throw parse_error (fmt::format ("invalid uri '{}'", m_value));
} }