Errors now print full path from CWD, not just filename

This commit is contained in:
Jan Černohorský 2024-02-17 23:46:46 +01:00
parent ce0a3e1192
commit 1950ab56e6

View file

@ -36,7 +36,7 @@ class FormatitkoRecursiveError(Exception):
print(*args, file=sys.stderr, **kwargs) print(*args, file=sys.stderr, **kwargs)
def print_filename_recursive(context: Context): def print_filename_recursive(context: Context):
return context.filename +\ return context.path +\
((" (included from " + print_filename_recursive(context.parent) + ")") if context.parent else "") ((" (included from " + print_filename_recursive(context.parent) + ")") if context.parent else "")
eprint(f"Error occured in file {print_filename_recursive(self.context)} in ", end="") eprint(f"Error occured in file {print_filename_recursive(self.context)} in ", end="")
line = None line = None