Added check if toot really was sent
the build failed Details

This commit is contained in:
tastytea 2018-08-30 01:13:22 +02:00
parent 4710021393
commit 2619e311cf
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
3 changed files with 14 additions and 2 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.6)
project (mastorss
VERSION 0.7.5
VERSION 0.7.6
LANGUAGES CXX
)

View File

@ -71,7 +71,13 @@ ${HOME}/.config/mastorss/config-example.json
## Error codes
Same as [mastodon-cpp](https://schlomp.space/tastytea/mastodon-cpp/src/branch/master/README.md#error-codes)
Same as
[mastodon-cpp](https://schlomp.space/tastytea/mastodon-cpp/src/branch/master/README.md#error-codes),
plus:
| Code | Explanation |
| --------: |:----------------------------------------|
| 1 | Could not send post for unknown reasons |
# Copyright

View File

@ -100,6 +100,12 @@ int main(int argc, char *argv[])
Mastodon::Easy masto(instance, access_token);
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)
{