from loguru import logger

from app import MainApp
import sys

import traceback


def main():
    try:
        app = MainApp()
        app.run()
    except Exception as e:
        logger.error(f"程序运行失败，错误 {e} 信息如下：")
        traceback.print_exc()
        sys.exit(1)


if __name__ == "__main__":
    main()
