sh_cpl/src/cpl_cli/error.py
2023-02-20 15:55:20 +01:00

16 lines
471 B
Python

from cpl_core.console.foreground_color_enum import ForegroundColorEnum
from cpl_core.console.console import Console
class Error:
@staticmethod
def error(message: str):
Console.error(message)
Console.error("Run 'cpl help'\n")
@staticmethod
def warn(message: str):
Console.set_foreground_color(ForegroundColorEnum.yellow)
Console.write_line(message, "\n")
Console.set_foreground_color(ForegroundColorEnum.default)