diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-08-08 15:02:51 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-08-12 21:19:06 +0300 |
commit | 9e994312cc65644c62964c9483643e930f3689b4 (patch) | |
tree | ca692957f4d7d5ed0b1043beea987752e690701e /bbot/worker/worker.cxx | |
parent | 0e3ef06a33c87a58019bf16b5757a5cac366ef7c (diff) |
Fix worker to handle std::system_error that can be thrown by dir_path::current_directory()
Diffstat (limited to 'bbot/worker/worker.cxx')
-rw-r--r-- | bbot/worker/worker.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx index cf6751b..beb57ba 100644 --- a/bbot/worker/worker.cxx +++ b/bbot/worker/worker.cxx @@ -504,7 +504,14 @@ build (size_t argc, const char* argv[]) // Noop, just for the log record. // - change_wd (trace, &r.log, dir_path::current_directory ()); + try + { + change_wd (trace, &r.log, dir_path::current_directory ()); + } + catch (const system_error& e) + { + fail << "unable to obtain current directory: " << e; + } // bpkg create <env-modules> <config-args> <env-config-args> // |