diff --git a/lib/include/account_mastodon.hpp b/lib/include/account_mastodon.hpp index e9cc51b..65c17e4 100644 --- a/lib/include/account_mastodon.hpp +++ b/lib/include/account_mastodon.hpp @@ -40,6 +40,7 @@ using std::thread; * @brief Interact with an account using the Mastodon API. * * @throw std::runtime_error No hashtag or list ID given. + * @throw std::logic_error Unhandled stream type. (Should never happen) * * @since 0.1.0 * @@ -97,6 +98,7 @@ public: * @param id The hashtag or list id. * * @throw std::runtime_error hashtag or list ID given. + * @throw std::logic_error Unhandled stream type. (Should never happen) * * @since 0.1.0 */ @@ -109,6 +111,7 @@ public: * @param id The hashtag or list id. * * @throw std::runtime_error No hashtag or list ID given. + * @throw std::logic_error Unhandled stream type. (Should never happen) * * @since 0.1.0 */ diff --git a/lib/src/account_mastodon.cpp b/lib/src/account_mastodon.cpp index 748b18e..8a1e157 100644 --- a/lib/src/account_mastodon.cpp +++ b/lib/src/account_mastodon.cpp @@ -17,11 +17,13 @@ #include "account_mastodon.hpp" #include "version.hpp" +#include #include namespace FediPotato { +using std::logic_error; using std::runtime_error; MastodonAPI::MastodonAPI(const string_view application_name, @@ -91,6 +93,8 @@ string MastodonAPI::get_stream_id(const stream_type type, break; } } + + throw logic_error{"Unhandled stream type."}; } } // namespace FediPotato