Skip to content

Commit

Permalink
💡 docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Wytamma committed Nov 2, 2023
1 parent 5b87859 commit 8072eaa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions snk/cli/dynamic_typer.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,12 @@ def func_wrapper(*args, **kwargs):
return func_wrapper

def error(self, msg, exit=True):
"""
Logs an error message and exits.
Args:
msg (str): The error message to log.
exit (bool): Whether to exit after logging the error message.
"""
typer.secho(msg, fg="red")
if exit:
raise typer.Exit(1)
Expand Down

0 comments on commit 8072eaa

Please sign in to comment.