changed error codes

This commit is contained in:
tastytea 2018-02-28 22:47:29 +01:00
parent 4da4565f67
commit beabd3aa54
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
3 changed files with 5 additions and 11 deletions

View File

@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.7)
include(GNUInstallDirs)
project (soupbot
VERSION 0.2.4
VERSION 0.3.0
LANGUAGES CXX
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall")

View File

@ -37,17 +37,11 @@ You will need a pre-generated authentication code.
## Error codes
Same as [mastodon-cpp](https://github.com/tastytea/mastodon-cpp/blob/master/README.md#error-codes), plus:
| Code | Explanation |
| --------: |:------------------------------|
| 0 | No error |
| 1 | Invalid call |
| 2 | Not implemented |
| 16 | Connection failed |
| 17 | TLS error |
| 18 | Invalid response from server |
| 32 | File not readable |
| 100 - 999 | HTTP status codes |
| 65535 | Unknown exception |
| 1 | File not readable |
If you use a debug build, you get more verbose error messages.

View File

@ -117,7 +117,7 @@ int main(int argc, char *argv[])
{
// most likely file not found
std::cerr << "ERROR: " << filepath << "ingredients.json not found or not readable.\n";
return 32;
return 1;
}
populate_vector(ingredients, "vegetables", vegetables);