Changed error codes for curlpp errors.
This commit is contained in:
parent
4fb13d1876
commit
9f21c5811a
|
@ -86,8 +86,8 @@ g++ -std=c++14 -lmastodon-cpp example.cpp
|
||||||
| 78 | URL changed (HTTP 301 or 308) |
|
| 78 | URL changed (HTTP 301 or 308) |
|
||||||
| 110 | Connection timed out |
|
| 110 | Connection timed out |
|
||||||
| 111 | Connection refused (check http_error_code) |
|
| 111 | Connection refused (check http_error_code) |
|
||||||
| 132 | curlpp runtime error |
|
| 192 | curlpp runtime error |
|
||||||
| 133 | curlpp logic error |
|
| 193 | curlpp logic error |
|
||||||
| 255 | Unknown error |
|
| 255 | Unknown error |
|
||||||
|
|
||||||
If you use a debug build, you get more verbose error messages.
|
If you use a debug build, you get more verbose error messages.
|
||||||
|
|
|
@ -178,7 +178,7 @@ return_call API::http::request(const method &meth,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ttdebug << "curlpp::RuntimeError: " << e.what() << std::endl;
|
ttdebug << "curlpp::RuntimeError: " << e.what() << std::endl;
|
||||||
return { 132, e.what(), 0, "" };
|
return { 192, e.what(), 0, "" };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (curlpp::LogicError &e)
|
catch (curlpp::LogicError &e)
|
||||||
|
@ -189,7 +189,7 @@ return_call API::http::request(const method &meth,
|
||||||
}
|
}
|
||||||
|
|
||||||
ttdebug << "curlpp::LogicError: " << e.what() << std::endl;
|
ttdebug << "curlpp::LogicError: " << e.what() << std::endl;
|
||||||
return { 133, e.what(), 0, "" };
|
return { 193, e.what(), 0, "" };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,8 +84,8 @@ namespace Mastodon
|
||||||
* | 78 | URL changed (HTTP 301 or 308) |
|
* | 78 | URL changed (HTTP 301 or 308) |
|
||||||
* | 110 | Connection timed out |
|
* | 110 | Connection timed out |
|
||||||
* | 111 | Connection refused (check http_error_code) |
|
* | 111 | Connection refused (check http_error_code) |
|
||||||
* | 132 | curlpp runtime error |
|
* | 192 | curlpp runtime error |
|
||||||
* | 133 | curlpp logic error |
|
* | 193 | curlpp logic error |
|
||||||
* | 255 | Unknown error |
|
* | 255 | Unknown error |
|
||||||
*
|
*
|
||||||
* @since before 0.11.0
|
* @since before 0.11.0
|
||||||
|
|
Reference in New Issue