From 4b1d1fe380041249d6b24dcddfd603828f77e23a Mon Sep 17 00:00:00 2001 From: robcxyz Date: Tue, 14 Mar 2023 06:39:24 +0530 Subject: [PATCH] fix: error context showing None for --- tackle/exceptions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tackle/exceptions.py b/tackle/exceptions.py index 4387036c7..5ed60c988 100644 --- a/tackle/exceptions.py +++ b/tackle/exceptions.py @@ -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"