Catch CURLExceptions from curl_wrapper.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
tastytea 2020-11-29 04:57:49 +01:00
parent f448e72df1
commit c47aac8dd2
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 6 additions and 0 deletions

View File

@ -15,6 +15,7 @@
*/
#include "config.hpp"
#include "curl_wrapper.hpp"
#include "document.hpp"
#include "exceptions.hpp"
#include "mastoapi.hpp"
@ -124,6 +125,11 @@ int run(const string_view profile_name, const bool dry_run)
cerr << e.what() << '\n';
return error::network;
}
catch (const curl_wrapper::CURLException &e)
{
cerr << e.what() << '\n';
return error::network;
}
catch (const Json::RuntimeError &e)
{
cerr << "JSON error:\n" << e.what() << '\n';