diff --git a/CMakeLists.txt b/CMakeLists.txt index 9119747..1443f36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/README.md b/README.md index 9bf457d..3f6cab6 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/src/soupbot.cpp b/src/soupbot.cpp index 911afd4..30ca2a8 100644 --- a/src/soupbot.cpp +++ b/src/soupbot.cpp @@ -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);