reo7sp / tgbot-cpp

C++ library for Telegram bot API
http://reo7sp.github.io/tgbot-cpp
MIT License
1.01k stars 246 forks source link

libc++abi.dylib: terminating with uncaught exception of type int #55

Closed ghost closed 6 years ago

ghost commented 6 years ago

Using OSX with Cmake 3.10, boost 1.64, while reading the image in the Photo example. main_cpp_-_echobot_-___volumes_1tb-ext_2019_db_stan_dropbox_dev2_cpp_bots_tgbot-cpp-master_samples_echobot_

ghost commented 6 years ago

https://github.com/reo7sp/tgbot-cpp/blob/4d9e96d9c91e1faeefb67de2164c026f84be020e/src/tools/FileTools.cpp#L22

Phew, reo7sp's crazyness.

Following code can give human-readable error message.

#include <string.h>

// ...

try {
  bot.getApi().sendPhoto(...);
} catch (int errno) {
  std::cout << strerror(errno) << '\n';
}
ghost commented 6 years ago

main_cpp_-_echobot_-___volumes_1tb-ext_2019_db_stan_dropbox_dev2_cpp_bots_tgbot-cpp-master_samples_echobot_

ghost commented 6 years ago

Anyone ...?

ghost commented 6 years ago

Sorry for delay. Make sure you have example.jpg (or other file specified in photoFilePath) in current working directory and it's readable.

ghost commented 6 years ago

@QuantScientist, is your problem solved? Can we close this issue (if so, please do it)?