From ea249098933b64b788b619870361d66050cbd707 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 8 Mar 2022 06:47:21 +1000 Subject: [PATCH] uri: include the malformed url when throwing a parse error --- uri.cpp.rl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/uri.cpp.rl b/uri.cpp.rl index f7235f2f..7da6620c 100644 --- a/uri.cpp.rl +++ b/uri.cpp.rl @@ -70,6 +70,10 @@ using cruft::uri; /////////////////////////////////////////////////////////////////////////////// +#include + + +//----------------------------------------------------------------------------- void cruft::uri::parse (void) { @@ -97,5 +101,5 @@ cruft::uri::parse (void) %%write exec; if (!__success) - throw parse_error ("invalid uri"); + throw parse_error (fmt::format ("invalid uri '{}'", m_value)); } \ No newline at end of file