Rework the client error handling

This commit is contained in:
Chunting Gu
2019-06-10 12:00:57 +08:00
parent c2a009f68a
commit 8c09189b14
16 changed files with 158 additions and 199 deletions
+8 -8
View File
@@ -67,8 +67,8 @@ void ListEvents(webcc::ClientSession& session) {
PRINT_JSON_STRING(r->content());
} catch (const webcc::Exception& e) {
std::cout << e.what() << std::endl;
} catch (const webcc::Error& error) {
std::cout << error << std::endl;
}
}
@@ -81,8 +81,8 @@ void ListUserFollowers(webcc::ClientSession& session, const std::string& user) {
PRINT_JSON_STRING(r->content());
} catch (const webcc::Exception& e) {
std::cout << e.what() << std::endl;
} catch (const webcc::Error& error) {
std::cout << error << std::endl;
}
}
@@ -100,8 +100,8 @@ void ListAuthUserFollowers(webcc::ClientSession& session,
PRINT_JSON_STRING(r->content());
} catch (const webcc::Exception& e) {
std::cout << e.what() << std::endl;
} catch (const webcc::Error& error) {
std::cout << error << std::endl;
}
}
@@ -124,8 +124,8 @@ void CreateAuthorization(webcc::ClientSession& session,
std::cout << r->content() << std::endl;
} catch (const webcc::Exception& e) {
std::cout << e.what() << std::endl;
} catch (const webcc::Error& error) {
std::cout << error << std::endl;
}
}