Print more context if an automated xact fails
This commit is contained in:
parent
f09c3906a2
commit
a0d8d84b87
1 changed files with 9 additions and 0 deletions
|
|
@ -407,6 +407,8 @@ void auto_xact_t::extend_xact(xact_base_t& xact, bool post_handler)
|
|||
{
|
||||
posts_list initial_posts(xact.posts.begin(), xact.posts.end());
|
||||
|
||||
try {
|
||||
|
||||
foreach (post_t * initial_post, initial_posts) {
|
||||
if (! initial_post->has_flags(ITEM_GENERATED) &&
|
||||
predicate(*initial_post)) {
|
||||
|
|
@ -460,6 +462,13 @@ void auto_xact_t::extend_xact(xact_base_t& xact, bool post_handler)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (const std::exception& err) {
|
||||
add_error_context(item_context(*this, _("While applying automated transaction")));
|
||||
add_error_context(item_context(xact, _("While extending transaction")));
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
void extend_xact_base(journal_t * journal,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue