Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting User-defined types documentation for 10.0.0 is outdated #3458

Closed
rlalik opened this issue May 23, 2023 · 3 comments
Closed

Formatting User-defined types documentation for 10.0.0 is outdated #3458

rlalik opened this issue May 23, 2023 · 3 comments

Comments

@rlalik
Copy link
Contributor

rlalik commented May 23, 2023

The example shows to use

// Check if reached the end of the range:
    if (it != end && *it != '}') ctx.on_error("invalid format");

but apparently on_error is not a member of the context class. format_error() should be used.

@vitaut
Copy link
Contributor

vitaut commented May 23, 2023

Good catch, thanks. Could you by any chance submit a PR to fix this?

@KubaO
Copy link

KubaO commented Jul 5, 2023

I would still like an answer re. what is the intended way of throwing errors in the formatter parser - other than leaving the iterator as-is while there are unparsed characters. I’d gladly submit a PR but I’m not even sure what it should say :)

@vitaut
Copy link
Contributor

vitaut commented Jul 5, 2023

As shown in the example the recommended way is to throw format_error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants