Exception for missing JSON Change key
| 266 | |
| 267 | /// Exception for missing JSON Change key |
| 268 | class InvalidJSONKey : public ExceptionBase |
| 269 | { |
| 270 | public: |
| 271 | std::string json; |
| 272 | /** |
| 273 | * @brief Constructor |
| 274 | * |
| 275 | * @param message A message to accompany the exception |
| 276 | * @param json The json data being processed |
| 277 | */ |
| 278 | InvalidJSONKey(std::string message, std::string json) |
| 279 | : ExceptionBase(message), json(json) { } |
| 280 | virtual ~InvalidJSONKey() noexcept {} |
| 281 | std::string py_message() const override { |
| 282 | std::string out_msg = m_message + |
| 283 | " for JSON data " + |
| 284 | (json.size() > 100 ? " (abbreviated): " : ": ") |
| 285 | + json.substr(0, 99); |
| 286 | return out_msg; |
| 287 | } |
| 288 | }; |
| 289 | |
| 290 | /// Exception when no streams are found in the file |
| 291 | class NoStreamsFound : public FileExceptionBase |
no outgoing calls
no test coverage detected