catch and print exception string in ui on main screen creation
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousDelivery / windows-asan (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / dumpsyms (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled

This commit is contained in:
Green Sky
2025-02-05 00:23:10 +01:00
parent d8d5b8e9a3
commit ce0ff0bea9
3 changed files with 23 additions and 5 deletions

View File

@@ -55,7 +55,7 @@ ToxClient::ToxClient(std::string_view save_path, std::string_view save_password)
profile_data.data(),
nullptr // TODO: error checking
)) {
throw std::runtime_error("FAILED to decrypt save file!!!!");
throw std::runtime_error("failed to decrypt save file!");
}
eee(_tox_profile_password);
}
@@ -69,12 +69,12 @@ ToxClient::ToxClient(std::string_view save_path, std::string_view save_password)
tox_options_set_experimental_groups_persistence(options, true);
TOX_ERR_NEW err_new;
Tox_Err_New err_new;
_tox = tox_new(options, &err_new);
tox_options_free(options);
if (err_new != TOX_ERR_NEW_OK) {
std::cerr << "tox_new failed with error code " << err_new << "\n";
throw std::runtime_error{"tox failed"};
throw std::runtime_error{std::string{"toxcore creation failed with '"} + tox_err_new_to_string(err_new) + "'"};
}
// no callbacks, use events