Skip to content

Commit

Permalink
fix: error context showing None for
Browse files Browse the repository at this point in the history
  • Loading branch information
robcxyz committed Mar 14, 2023
1 parent 64c9ee1 commit 4b1d1fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tackle/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ class TackleParserException(Exception):
"""Base parser exception class."""

def __init__(self, extra_message: str, context: 'Union[Context, BaseContext]'):
if context.current_file is None:
context.current_file = context.calling_file

self.message = (
f"Error parsing input_file='{context.current_file}' at "
f"key_path='{get_readable_key_path(key_path=context.key_path)}' \n"
Expand Down

0 comments on commit 4b1d1fe

Please sign in to comment.