sys and print what

This commit is contained in:
Green Sky 2024-05-25 15:00:11 +02:00
parent c1af43ce54
commit 77005cba4b
No known key found for this signature in database

View File

@ -28,6 +28,7 @@
#include <iomanip>
#include <sstream>
#include <stdexcept>
#include <system_error>
#include <variant>
namespace Components {
@ -170,8 +171,13 @@ void ChatGui4::setClipboardData(std::vector<std::string> mime_types, std::shared
SDL_SetClipboardData(clipboard_callback, nullptr, this, tmp_mimetype_list.data(), tmp_mimetype_list.size());
} catch (const std::runtime_error& e) {
std::cerr << "CG error: setting clipboard data threw runtime_error!\n";
std::cerr << "what: " << e.what() << "\n";
} catch (const std::system_error& e) {
std::cerr << "CG error: setting clipboard data threw system_error!\n";
std::cerr << "what: " << e.what() << "\n";
} catch (const std::exception& e) {
std::cerr << "CG error: setting clipboard data threw exception!\n";
std::cerr << "what: " << e.what() << "\n";
} catch (...) {
std::cerr << "CG error: setting clipboard data threw!\n";
}