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

How to handle errors in custom formatter parse method (doc bug)? #3522

Closed
KubaO opened this issue Jul 4, 2023 · 1 comment
Closed

How to handle errors in custom formatter parse method (doc bug)? #3522

KubaO opened this issue Jul 4, 2023 · 1 comment

Comments

@KubaO
Copy link

KubaO commented Jul 4, 2023

The documentation example implies that there's format_parse_context::on_error method. But there doesn't seem to be so the below does not compile:

  constexpr auto parse(format_parse_context& ctx) -> format_parse_context::iterator {
    /* ... */
    if (it != end && *it != '}') ctx.on_error("invalid format");
    /* ... */
  }
@KubaO KubaO changed the title How to handle errors in custom formatter parse method> How to handle errors in custom formatter parse method (doc bug)? Jul 4, 2023
@vitaut
Copy link
Contributor

vitaut commented Jul 5, 2023

Duplicate of #3458.

@vitaut vitaut closed this as completed Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants