def METHOD_NAME(msg: str, e: Exception | None = None) -> None:
    trace = ""
    if e:
        trace = "\n".join(traceback.format_exception(type(e), e, e.__traceback__))
    QtWidgets.QMessageBox.critical(QtWidgets.QMainWindow(), "Error", msg + trace)