Added error code 12
This commit is contained in:
parent
805384ca0b
commit
9bc6e401aa
@ -78,6 +78,7 @@ After you did a `make install`, a project consisting of one file can be compiled
|
||||
| 4 | Aborted by user |
|
||||
| 10 | Failed to connect |
|
||||
| 11 | Couldn't resolve host |
|
||||
| 12 | Network is unreachable |
|
||||
| 100 - 999 | HTTP status codes |
|
||||
| 65535 | Unknown error |
|
||||
|
||||
|
@ -151,6 +151,11 @@ const std::uint16_t API::http::request_sync(const method &meth,
|
||||
{
|
||||
ret = 11;
|
||||
}
|
||||
else if (std::strncmp(e.what(),
|
||||
"Network is unreachable", 22) == 0)
|
||||
{
|
||||
ret = 12;
|
||||
}
|
||||
else
|
||||
{
|
||||
cerr << "RUNTIME ERROR: " << e.what() << std::endl;
|
||||
|
@ -49,8 +49,9 @@ namespace Mastodon
|
||||
* | 2 | Not implemented |
|
||||
* | 3 | URL changed (HTTP 301 or 308) |
|
||||
* | 4 | Aborted by user |
|
||||
* | 10 | Failed to connect |
|
||||
* | 11 | Couldn't resolve host |
|
||||
* | 10 | Failed to connect |
|
||||
* | 11 | Couldn't resolve host |
|
||||
* | 12 | Network is unreachable |
|
||||
* | 100 - 999 | HTTP status codes |
|
||||
* | 65535 | Unknown exception |
|
||||
*/
|
||||
|
Reference in New Issue
Block a user