Prints a string in bold red then exits with an error code of 1. Parameters: string (str): String to print in red; prefixed with "ERROR: " automatically.
(string: str)
| 33 | ) |
| 34 | |
| 35 | |
| 36 | def die(string: str) -> NoReturn: |
| 37 | """ |
| 38 | Prints a string in bold red then exits with an error code of 1. |
| 39 | |
| 40 | Parameters: |
| 41 | string (str): String to print in red; prefixed with "ERROR: " |
| 42 | automatically. |
| 43 | """ |
| 44 | red(f"ERROR: {string}") |
| 45 | sys.exit(1) |
| 46 | |
| 47 |
no test coverage detected