added error 23

This commit is contained in:
tastytea 2018-04-02 02:29:39 +02:00
parent a0deca93c6
commit 69fd5138ee
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
4 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.7)
project (mastodon-cpp
VERSION 0.7.23
VERSION 0.7.24
LANGUAGES CXX
)

View File

@ -78,6 +78,7 @@ mastodon-cpp will never use error codes below 11, except 0.
| 20 | Failed to connect |
| 21 | Couldn't resolve host |
| 22 | Network is unreachable |
| 23 | Transfer interrupted |
| 100 - 999 | HTTP status codes |
| 65535 | Unknown error |

View File

@ -159,6 +159,11 @@ const uint_fast16_t API::http::request(const method &meth,
{
ret = 22;
}
else if (std::strncmp(e.what(),
"transfer closed with outstanding", 32) == 0)
{
ret = 23;
}
else
{
cerr << "RUNTIME ERROR: " << e.what() << std::endl;

View File

@ -65,6 +65,7 @@ namespace Mastodon
* | 20 | Failed to connect |
* | 21 | Couldn't resolve host |
* | 22 | Network is unreachable |
* | 23 | Transfer interrupted |
* | 100 - 999 | HTTP status codes |
* | 65535 | Unknown exception |
*/