| 370 | #pragma GCC diagnostic pop |
| 371 | #endif |
| 372 | class OptionException : public std::exception |
| 373 | { |
| 374 | public: |
| 375 | explicit OptionException(std::string message) |
| 376 | : m_message(std::move(message)) |
| 377 | { |
| 378 | } |
| 379 | |
| 380 | CXXOPTS_NODISCARD |
| 381 | const char* |
| 382 | what() const noexcept override |
| 383 | { |
| 384 | return m_message.c_str(); |
| 385 | } |
| 386 | |
| 387 | private: |
| 388 | std::string m_message; |
| 389 | }; |
| 390 | |
| 391 | class OptionSpecException : public OptionException |
| 392 | { |
nothing calls this directly
no outgoing calls
no test coverage detected