| 764 | |
| 765 | /// Thrown when too many positionals or options are found |
| 766 | class ExtrasError : public ParseError { |
| 767 | CLI11_ERROR_DEF(ParseError, ExtrasError) |
| 768 | explicit ExtrasError(std::vector<std::string> args) |
| 769 | : ExtrasError((args.size() > 1 ? "The following arguments were not expected: " |
| 770 | : "The following argument was not expected: ") + |
| 771 | detail::rjoin(args, " "), |
| 772 | ExitCodes::ExtrasError) {} |
| 773 | ExtrasError(const std::string &name, std::vector<std::string> args) |
| 774 | : ExtrasError(name, |
| 775 | (args.size() > 1 ? "The following arguments were not expected: " |
| 776 | : "The following argument was not expected: ") + |
| 777 | detail::rjoin(args, " "), |
| 778 | ExitCodes::ExtrasError) {} |
| 779 | }; |
| 780 | |
| 781 | /// Thrown when extra values are found in an INI file |
| 782 | class ConfigError : public ParseError { |
no outgoing calls
no test coverage detected