diff --git a/LunaTranslator/LunaTranslator/LunaTranslator.py b/LunaTranslator/LunaTranslator/LunaTranslator.py index 3896bdb2..1a09a992 100644 --- a/LunaTranslator/LunaTranslator/LunaTranslator.py +++ b/LunaTranslator/LunaTranslator/LunaTranslator.py @@ -764,16 +764,15 @@ class MAINUI: aclass = importlib.import_module("translator." + classname).TS elif which == 1: aclass = importlib.import_module("userconfig.copyed." + classname).TS + return aclass(classname) except Exception as e: - print_exc() self.displayinfomessage( globalconfig["fanyi"][classname]["name"] + " import failed : " + str(stringfyerror(e)), "", ) - return None - return aclass(classname) + raise e @threader def prepare(self, now=None, _=None): @@ -802,17 +801,15 @@ class MAINUI: if _type not in globalconfig[rankkey]: globalconfig[rankkey].append(_type) else: - if _type in globalconfig[rankkey]: globalconfig[rankkey].remove(_type) - - if not use: - return item = initmethod(_type) if item: dictobject[_type] = item except: + if _type in globalconfig[rankkey]: + globalconfig[rankkey].remove(_type) print_exc() @threader @@ -820,13 +817,9 @@ class MAINUI: self.commonloader("cishu", self.cishus, self.cishuinitmethod, type_) def cishuinitmethod(self, type_): - try: - aclass = importlib.import_module("cishu." + type_) - aclass = getattr(aclass, type_) - except: - print_exc() - return + aclass = importlib.import_module("cishu." + type_) + aclass = getattr(aclass, type_) return aclass(type_) def maybesetedittext(self, text): diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index a20aaa0c..2b6b3f85 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 28) -set(VERSION_PATCH 2) +set(VERSION_PATCH 3) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)