errors: Report version in compiler bug message

This commit is contained in:
James Westman 2023-04-09 16:50:36 -05:00
parent 88f5b4f1c7
commit d6bd282e58

View file

@ -170,8 +170,11 @@ def assert_true(truth: bool, message: T.Optional[str] = None):
def report_bug(): # pragma: no cover def report_bug(): # pragma: no cover
"""Report an error and ask people to report it.""" """Report an error and ask people to report it."""
from . import main
print(traceback.format_exc()) print(traceback.format_exc())
print(f"Arguments: {sys.argv}\n") print(f"Arguments: {sys.argv}")
print(f"Version: {main.VERSION}\n")
print( print(
f"""{Colors.BOLD}{Colors.RED}***** COMPILER BUG ***** f"""{Colors.BOLD}{Colors.RED}***** COMPILER BUG *****
The blueprint-compiler program has crashed. Please report the above stacktrace, The blueprint-compiler program has crashed. Please report the above stacktrace,