diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-10-05 15:27:12 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-10-05 15:27:12 +0200 |
commit | dd4393647c51e75abeea8cd3e516ca1ed2bd23f3 (patch) | |
tree | 296fda588f7fd2669bea7446ab2635a223b1fae5 /bbot/worker/worker.cxx | |
parent | 1514398c7189409b02f445c93755ef179c7c13d7 (diff) |
Handle case where io_error not derived from system_error
Diffstat (limited to 'bbot/worker/worker.cxx')
-rw-r--r-- | bbot/worker/worker.cxx | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx index 85b3265..17c4fa9 100644 --- a/bbot/worker/worker.cxx +++ b/bbot/worker/worker.cxx @@ -1443,24 +1443,29 @@ build (size_t argc, const char* argv[]) c.out.close (); if (!c.wait ()) throw_generic_error (EIO); + + // We use exit code 2 to signal abnormal termination but where we managed + // to upload the result manifest. See startup() for details. + // + return rm.status != result_status::abnormal ? 0 : 2; } catch (const manifest_serialization& e) { fail << "invalid result manifest: " << e.description; } + catch (const io_error& e) // In case not derived from system_error. + { + error << "unable to upload result manifest to " << url << ": " << e; + } catch (const system_error& e) { - // We use exit code 3 to signal an unsuccessful attempt to upload the - // result manifest. See startup() for details. - // error << "unable to upload result manifest to " << url << ": " << e; - return 3; } - // We use exit code 2 to signal abnormal termination but where we managed - // to upload the result manifest. See startup() for details. + // We use exit code 3 to signal an unsuccessful attempt to upload the result + // manifest. See startup() for details. // - return rm.status != result_status::abnormal ? 0 : 2; + return 3; } static int |