Bugfix: Don't throw unknown error if return code from mastodon-cpp is != 0
This commit is contained in:
parent
603532a334
commit
2cf7cac099
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 3.6)
|
cmake_minimum_required (VERSION 3.6)
|
||||||
project (mastorss
|
project (mastorss
|
||||||
VERSION 0.8.2
|
VERSION 0.8.3
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -102,12 +102,6 @@ int main(int argc, char *argv[])
|
||||||
Mastodon::Easy masto(instance, access_token);
|
Mastodon::Easy masto(instance, access_token);
|
||||||
|
|
||||||
answer = masto.send_post(*rit, ret);
|
answer = masto.send_post(*rit, ret);
|
||||||
if (answer.to_object().isNull())
|
|
||||||
{
|
|
||||||
std::cerr << "Could not send post for unknown reasons.\n";
|
|
||||||
std::cerr << "Please file a bug at <https://schlomp.space/tastytea/mastorss/issues>.\n";
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
{
|
{
|
||||||
|
@ -116,6 +110,13 @@ int main(int argc, char *argv[])
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (answer.to_object().isNull())
|
||||||
|
{
|
||||||
|
std::cerr << "Could not send post for unknown reasons.\n";
|
||||||
|
std::cerr << "Please file a bug at <https://schlomp.space/tastytea/mastorss/issues>.\n";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (rit != entries.rend())
|
if (rit != entries.rend())
|
||||||
{ // Only sleep if this is not the last entry
|
{ // Only sleep if this is not the last entry
|
||||||
sleep_for(seconds(config[profile]["interval"].asUInt64()));
|
sleep_for(seconds(config[profile]["interval"].asUInt64()));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user