aboutsummaryrefslogtreecommitdiff
path: root/build2/depdb.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-04-03 21:19:50 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-04-03 21:24:46 +0300
commit6e126ac30038502acf7016f0e76b3183f1304042 (patch)
tree0db3f56340e8c55a559e96762742ec925dbca68d /build2/depdb.hxx
parenta797f6dd584c6f25bac7b0ed122ea7d1d9a42684 (diff)
Change depdb API and handle system_error thrown by butl::file_mtime()
Previously, debdb operations threw system_error and io_error to signal errors, except for opening which issued diagnostics and failed. Now all operations print the diagnostics and fail on system and IO errors.
Diffstat (limited to 'build2/depdb.hxx')
-rw-r--r--build2/depdb.hxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/build2/depdb.hxx b/build2/depdb.hxx
index f1e86a1..64ea627 100644
--- a/build2/depdb.hxx
+++ b/build2/depdb.hxx
@@ -12,9 +12,8 @@
namespace build2
{
- // Auxiliary dependency database (those .d files). Uses io_error and
- // system_error exceptions to signal errors except for openning (see
- // below).
+ // Auxiliary dependency database (those .d files). Prints the diagnostics
+ // and fails on system and IO errors.
//
// This is a strange beast: a line-oriented, streaming database that can, at
// some point, be switched from reading to (over)writing. The idea is to
@@ -95,11 +94,10 @@ namespace build2
// has wrong format version, or is corrupt, then the database will be
// immediately switched to writing.
//
- // If the database cannot be opened, issue diagnostics and throw failed.
- // This commonly happens when the user tries to stash the target in a
- // non-existent subdirectory but forgets to add the corresponding fsdir{}
- // prerequisite. Handling this as io_error in every rule that uses depdb
- // would be burdensome thus we issue the diagnostics here.
+ // The failure commonly happens when the user tries to stash the target in
+ // a non-existent subdirectory but forgets to add the corresponding fsdir{}
+ // prerequisite. That's why the issued diagnostics may provide the
+ // corresponding hint.
//
explicit
depdb (path_type);