diff options
author | Oleg Morozenkov <omorozenkov@gmail.com> | 2015-07-29 14:45:45 +0300 |
---|---|---|
committer | Oleg Morozenkov <omorozenkov@gmail.com> | 2015-07-29 14:45:45 +0300 |
commit | 99072def67e54d664edd96b9c0f124c4f09cedee (patch) | |
tree | b34ce972e87686b27f6d66ffaa31b079aa0b52d7 /samples | |
parent | f69b2ac4ff123e0fb8b335fe28f6de4242c4f396 (diff) |
Fix includes + fix some minor bugs
Diffstat (limited to 'samples')
-rw-r--r-- | samples/echobot/src/main.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/samples/echobot/src/main.cpp b/samples/echobot/src/main.cpp index 7b8d880..61f4019 100644 --- a/samples/echobot/src/main.cpp +++ b/samples/echobot/src/main.cpp @@ -26,8 +26,6 @@ #include <tgbot/Bot.h> #include <tgbot/net/TgLongPoll.h> -#include <tgbot/TgException.h> -#include <tgbot/tools/StringTools.h> using namespace std; using namespace TgBot; @@ -52,7 +50,6 @@ int main() { bot.getApi().sendMessage(message->chat->id, "Your message is: " + message->text); }); - printf("try {\n"); try { printf("Bot username: %s\n", bot.getApi().getMe()->username.c_str()); @@ -61,10 +58,9 @@ int main() { printf("Long poll started\n"); longPoll.start(); } - } catch (TgException& e) { + } catch (exception& e) { printf("error: %s\n", e.what()); } - printf("}\n"); return 0; } |