bad_word

struct mikrotik::api::bad_word : public exception

Exception describing failures occurring during handling words.

An exception that describes words that caused problems. For example such a situation is a word that’s too long (ie. its length takes more than four bytes to represent).

Note

The exception may not contain the whole word, just a representation of it. For example a word containing 50 million characters is a word that’s too long to handle so trying to process it will cause this exception. The word in the exception will only contain the first and last 4 characters and an indication about the amount of characters omitted.

Since

v1.0.0

Public Functions

bad_word(std::string_view word, std::string_view reason = "unknown error")

Creates a bad_word exception with the provided word and the reason for the error.

Since

v1.0.0

Parameters
  • word: The word that caused the error

  • reason: A string describing the error

const char *what() const noexcept override

Returns a formatted error message about the error

Return

A c-string with the error message

Since

v1.0.0