(exception:Exception=None)
| 47 | |
| 48 | @staticmethod |
| 49 | def print_debug(exception:Exception=None): |
| 50 | if GeneralSetting().isDebug: |
| 51 | message = "" |
| 52 | if isinstance(exception,Exception): |
| 53 | import traceback |
| 54 | traceback.print_exc() |
| 55 | # exc_type, exc_value, exc_traceback = sys.exc_info() |
| 56 | # if exc_traceback: |
| 57 | # message = f"{exc_value} {exc_traceback}" |
| 58 | else: |
| 59 | message = str(exception) |
| 60 | AnsiPrint.print(f"[bold][yellow][debug][reset] [yellow]{message} [reset]") |
| 61 | |
| 62 | @staticmethod |
| 63 | def print_success(text:str)->None: |
no test coverage detected