diff options
-rw-r--r-- | libbuild2/depdb.ixx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libbuild2/depdb.ixx b/libbuild2/depdb.ixx index 92afa32..819fadd 100644 --- a/libbuild2/depdb.ixx +++ b/libbuild2/depdb.ixx @@ -1,6 +1,8 @@ // file : libbuild2/depdb.ixx -*- C++ -*- // license : MIT; see accompanying LICENSE file +#include <libbuild2/diagnostics.hxx> + namespace build2 { inline depdb_base:: @@ -16,7 +18,14 @@ namespace build2 flush () { if (state_ == state::write) + try + { os_.flush (); + } + catch (const io_error& e) + { + fail << "unable to flush " << path << ": " << e; + } } inline bool depdb:: |