Changed error codes for curlpp errors.

This commit is contained in:
tastytea 2019-02-28 15:47:25 +01:00
parent 4fb13d1876
commit 9f21c5811a
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
3 changed files with 6 additions and 6 deletions

View File

@ -86,8 +86,8 @@ g++ -std=c++14 -lmastodon-cpp example.cpp
| 78 | URL changed (HTTP 301 or 308) |
| 110 | Connection timed out |
| 111 | Connection refused (check http_error_code) |
| 132 | curlpp runtime error |
| 133 | curlpp logic error |
| 192 | curlpp runtime error |
| 193 | curlpp logic error |
| 255 | Unknown error |
If you use a debug build, you get more verbose error messages.

View File

@ -178,7 +178,7 @@ return_call API::http::request(const method &meth,
else
{
ttdebug << "curlpp::RuntimeError: " << e.what() << std::endl;
return { 132, e.what(), 0, "" };
return { 192, e.what(), 0, "" };
}
}
catch (curlpp::LogicError &e)
@ -189,7 +189,7 @@ return_call API::http::request(const method &meth,
}
ttdebug << "curlpp::LogicError: " << e.what() << std::endl;
return { 133, e.what(), 0, "" };
return { 193, e.what(), 0, "" };
}
}

View File

@ -84,8 +84,8 @@ namespace Mastodon
* | 78 | URL changed (HTTP 301 or 308) |
* | 110 | Connection timed out |
* | 111 | Connection refused (check http_error_code) |
* | 132 | curlpp runtime error |
* | 133 | curlpp logic error |
* | 192 | curlpp runtime error |
* | 193 | curlpp logic error |
* | 255 | Unknown error |
*
* @since before 0.11.0