diff options
Diffstat (limited to 'build2/algorithm.cxx')
-rw-r--r-- | build2/algorithm.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/build2/algorithm.cxx b/build2/algorithm.cxx index a532d7c..2ea2d1a 100644 --- a/build2/algorithm.cxx +++ b/build2/algorithm.cxx @@ -613,12 +613,16 @@ namespace build2 const diag_frame* ds) { diag_frame df (ds); - phase_lock pl (run_phase::match); + try { - target_lock l {&t, offset}; // Reassemble. - match_impl (a, l, false /* step */, try_match); - // Unlock withing the match phase. + phase_lock pl (run_phase::match); // Can throw. + { + target_lock l {&t, offset}; // Reassemble. + match_impl (a, l, false /* step */, try_match); + // Unlock withing the match phase. + } } + catch (const failed&) {} // Phase lock failure. }, ref (*l.release ()), l.offset, |