From afcf424294ee25ea0f22e7f0f20abddb8329d643 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 16 Sep 2022 15:27:18 -0700 Subject: [PATCH] Update docs --- doc/api.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api.rst b/doc/api.rst index bcd9289a..32be8e0b 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -94,7 +94,7 @@ types. To make a user-defined type formattable, specialize the ``formatter`` struct template and implement ``parse`` and ``format`` methods:: - #include + #include struct point { double x, y; @@ -126,7 +126,7 @@ template and implement ``parse`` and ``format`` methods:: if (it != end && (*it == 'f' || *it == 'e')) presentation = *it++; // Check if reached the end of the range: - if (it != end && *it != '}') throw format_error("invalid format"); + if (it != end && *it != '}') ctx.on_error("invalid format"); // Return an iterator past the end of the parsed range: return it;