| 599 | |
| 600 | /// Thrown on construction of a bad name |
| 601 | class BadNameString : public ConstructionError { |
| 602 | CLI11_ERROR_DEF(ConstructionError, BadNameString) |
| 603 | CLI11_ERROR_SIMPLE(BadNameString) |
| 604 | static BadNameString OneCharName(std::string name) { return BadNameString("Invalid one char name: " + name); } |
| 605 | static BadNameString BadLongName(std::string name) { return BadNameString("Bad long name: " + name); } |
| 606 | static BadNameString DashesOnly(std::string name) { |
| 607 | return BadNameString("Must have a name, not just dashes: " + name); |
| 608 | } |
| 609 | static BadNameString MultiPositionalNames(std::string name) { |
| 610 | return BadNameString("Only one positional name allowed, remove: " + name); |
| 611 | } |
| 612 | }; |
| 613 | |
| 614 | /// Thrown when an option already exists |
| 615 | class OptionAlreadyAdded : public ConstructionError { |
no outgoing calls
no test coverage detected