tzk/util.py

12 lines
189 B
Python
Raw Normal View History

import sys
from typing import NoReturn
2021-08-26 19:04:09 +00:00
class BuildError(Exception):
pass
def fail(msg: str, exit_code: int = 1) -> NoReturn:
print(msg, file=sys.stderr)
sys.exit(exit_code)