diff options
Diffstat (limited to 'composite.cpp')
-rw-r--r-- | composite.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/composite.cpp b/composite.cpp index bac075c..49a2301 100644 --- a/composite.cpp +++ b/composite.cpp | |||
@@ -29,14 +29,15 @@ int main(int argc, char** argv) | |||
29 | std::string output = "Full Metal " + noun; | 29 | std::string output = "Full Metal " + noun; |
30 | std::cout << output << std::endl; | 30 | std::cout << output << std::endl; |
31 | 31 | ||
32 | twitter::tweet sent; | 32 | try |
33 | twitter::response resp = client.updateStatus(output, sent); | ||
34 | if (resp != twitter::response::ok) | ||
35 | { | 33 | { |
36 | std::cout << "Twitter error: " << resp << std::endl; | 34 | client.updateStatus(output); |
35 | } catch (const twitter::twitter_error& e) | ||
36 | { | ||
37 | std::cout << "Twitter error: " << e.what() << std::endl; | ||
37 | } | 38 | } |
38 | 39 | ||
39 | std::cout << "Waiting..." << std::endl; | 40 | std::cout << "Waiting..." << std::endl; |
40 | std::this_thread::sleep_for(std::chrono::hours(1)); | 41 | std::this_thread::sleep_for(std::chrono::hours(1)); |
41 | } | 42 | } |
42 | } \ No newline at end of file | 43 | } |