From d6bd282e58341b5a131e7bfa21852ce239fb94a2 Mon Sep 17 00:00:00 2001 From: James Westman Date: Sun, 9 Apr 2023 16:50:36 -0500 Subject: [PATCH] errors: Report version in compiler bug message --- blueprintcompiler/errors.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/blueprintcompiler/errors.py b/blueprintcompiler/errors.py index 4a18589..3fc2666 100644 --- a/blueprintcompiler/errors.py +++ b/blueprintcompiler/errors.py @@ -170,8 +170,11 @@ def assert_true(truth: bool, message: T.Optional[str] = None): def report_bug(): # pragma: no cover """Report an error and ask people to report it.""" + from . import main + print(traceback.format_exc()) - print(f"Arguments: {sys.argv}\n") + print(f"Arguments: {sys.argv}") + print(f"Version: {main.VERSION}\n") print( f"""{Colors.BOLD}{Colors.RED}***** COMPILER BUG ***** The blueprint-compiler program has crashed. Please report the above stacktrace,