From 60b9820a548cbe973fb720d5999372be591b1a05 Mon Sep 17 00:00:00 2001 From: codeboss <2422523675@qq.com> Date: Sun, 10 Aug 2025 20:36:29 +0800 Subject: [PATCH] update assert --- TranslateUI/TranslateBasic.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TranslateUI/TranslateBasic.cpp b/TranslateUI/TranslateBasic.cpp index a839b90..36b1bf5 100644 --- a/TranslateUI/TranslateBasic.cpp +++ b/TranslateUI/TranslateBasic.cpp @@ -101,7 +101,7 @@ void TranslateBasic::removeDelegate(const QString& typeAlias) } } - assert("指定RuleName不合法" && 0); + throw new BaseException("指定RuleName不合法"); } QList TranslateBasic::delegateAlias() const @@ -120,7 +120,7 @@ std::shared_ptr TranslateBasic::operator[](const QString& name) if(ins->aliasName() == name) return ins; - assert("指定Name不存在" && 0); + throw new BaseException(u8"指定Name不存在"); } void TranslateBasic::replaceDelegate(const QString& name, std::shared_ptr inst) @@ -133,7 +133,7 @@ void TranslateBasic::replaceDelegate(const QString& name, std::shared_ptr> TranslateBasic::sizeProviderMap() const