mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-24 16:23:36 +05:00
refactor: print traceback of exception
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -12,6 +12,7 @@ from __future__ import annotations
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
|
import traceback
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from typing import Type, Dict, Optional
|
from typing import Type, Dict, Optional
|
||||||
|
|
||||||
@@ -213,4 +214,6 @@ class BaseMenu(metaclass=PostInitCaller):
|
|||||||
option.method(opt_index=option.opt_index, opt_data=option.opt_data)
|
option.method(opt_index=option.opt_index, opt_data=option.opt_data)
|
||||||
self.run()
|
self.run()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
Logger.print_error(f"An unexpected error occured:\n{e}")
|
Logger.print_error(
|
||||||
|
f"An unexpected error occured:\n{e}\n{traceback.format_exc()}"
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user