Skip to content

Commit

Permalink
improve error message on undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Beck committed Oct 23, 2018
1 parent 045783e commit 8a92136
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions dbt/clients/jinja.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,15 @@ def __deepcopy__(self, memo):
self.node.get('original_file_path'))

logger.debug(
'A ParserMacroCapture has been deecopy()d, invalid reference '
'to "{}" in node {}.{} (source path: {})'
'dbt encountered an undefined variable, "{}" in node {}.{} '
'(source path: {})'
.format(self.name, self.node.get('package_name'),
self.node.get('name'),
path))
self.node.get('name'), path))

# match jinja's message
dbt.exceptions.raise_compiler_error(
'dbt has detected at least one invalid reference in {}.{}. '
'Check logs for more information'
.format(self.node.get('package_name'), self.node.get('name'))
"{!r} is undefined".format(self.name),
node=self.node
)

def __getitem__(self, name):
Expand Down

0 comments on commit 8a92136

Please sign in to comment.