Propagate out parsing context counts
This commit is contained in:
parent
4cfa4bca08
commit
7a141edb49
1 changed files with 15 additions and 3 deletions
|
|
@ -744,6 +744,9 @@ void instance_t::include_directive(char * line)
|
||||||
journal_t * journal = context.journal;
|
journal_t * journal = context.journal;
|
||||||
account_t * master = context.master;
|
account_t * master = context.master;
|
||||||
scope_t * scope = context.scope;
|
scope_t * scope = context.scope;
|
||||||
|
std::size_t& errors = context.errors;
|
||||||
|
std::size_t& count = context.count;
|
||||||
|
std::size_t& sequence = context.sequence;
|
||||||
|
|
||||||
context_stack.push(*iter);
|
context_stack.push(*iter);
|
||||||
|
|
||||||
|
|
@ -757,9 +760,18 @@ void instance_t::include_directive(char * line)
|
||||||
instance.parse();
|
instance.parse();
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
|
errors += context_stack.get_current().errors;
|
||||||
|
count += context_stack.get_current().count;
|
||||||
|
sequence += context_stack.get_current().sequence;
|
||||||
|
|
||||||
context_stack.pop();
|
context_stack.pop();
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
errors += context_stack.get_current().errors;
|
||||||
|
count += context_stack.get_current().count;
|
||||||
|
sequence += context_stack.get_current().sequence;
|
||||||
|
|
||||||
context_stack.pop();
|
context_stack.pop();
|
||||||
|
|
||||||
files_found = true;
|
files_found = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue