From c47aac8dd25d11beb8bd6d2d8c1008dbc0456e58 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 29 Nov 2020 04:57:49 +0100 Subject: [PATCH] Catch CURLExceptions from curl_wrapper. --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index b1db66d..d073b1f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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';