def METHOD_NAME(self) -> None:
    last_type, last_value, last_tb = sys.exc_info()
    try:
        self.last_traceback = ''.join(traceback.format_exception(last_type, last_value, last_tb))
        self.take_screenshot()
        super().METHOD_NAME()  # report the error to Sentry
    finally:
        del last_tb