def log_and_exit()

in src/smspark/errors.py [0:0]


    def log_and_exit(self) -> None:
        """Write message to output file and exit."""
        path = pathlib.Path(BaseError.message_path)
        path.parent.mkdir(parents=True, exist_ok=True)
        with open(str(path), "w") as output_message_file:
            output_message_file.write(self.message)
        self.logger.info(f"exiting with code {self.exit_code}: {self.message}")
        sys.exit(self.exit_code)