diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-10-05 15:27:12 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-10-27 15:49:45 +0200 |
commit | 49653c56bd5b9c7b8ad459b278634ddbb9115a74 (patch) | |
tree | 37f50ff9cb11299f97f9295660761455bb226e93 | |
parent | 5f02a68719ed772d27371bcb793f94e241b878f6 (diff) |
Handle case where io_error not derived from system_error
-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 6edadcc..26fa26b 100644 --- a/bbot/worker/worker.cxx +++ b/bbot/worker/worker.cxx @@ -1396,24 +1396,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 |