Throw an exception if an include file doesn't exist
This commit is contained in:
parent
687c71c71d
commit
c927c74c2d
1 changed files with 4 additions and 0 deletions
|
|
@ -613,6 +613,10 @@ void instance_t::include_directive(char * line)
|
|||
DEBUG("textual.include", "Line " << linenum << ": " <<
|
||||
"Including path '" << filename << "'");
|
||||
|
||||
if (! exists(filename))
|
||||
throw_(std::runtime_error,
|
||||
_("File to include was not found: '%1'" << filename));
|
||||
|
||||
ifstream stream(filename);
|
||||
|
||||
instance_t instance(account_stack, tag_stack,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue