added error 23
This commit is contained in:
parent
a0deca93c6
commit
69fd5138ee
@ -1,6 +1,6 @@
|
||||
cmake_minimum_required (VERSION 3.7)
|
||||
project (mastodon-cpp
|
||||
VERSION 0.7.23
|
||||
VERSION 0.7.24
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
|
@ -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 |
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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 |
|
||||
*/
|
||||
|
Reference in New Issue
Block a user