mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-31 10:26:39 +01:00
15 lines
430 B
Python
15 lines
430 B
Python
#!/usr/bin/python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from slpkg.configs import Configs
|
|
|
|
|
|
class Errors(Configs):
|
|
|
|
def __init__(self):
|
|
super(Configs, self).__init__()
|
|
|
|
def raise_error_message(self, message: str, exit_status: int) -> None:
|
|
""" A general method to raise an error message and exit. """
|
|
print(f"\n{self.prog_name}: {self.bred}Error{self.endc}: {message}\n")
|
|
raise SystemExit(exit_status)
|