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;