diff --git a/common/customizefunctionthread.py b/common/customizefunctionthread.py index becbfae021093e1b4afba1bb80b1502dcf25e366..b4edd74d1db9f489beb754d8cd567e3c284078a4 100644 --- a/common/customizefunctionthread.py +++ b/common/customizefunctionthread.py @@ -9,10 +9,11 @@ class CustomizeFunctionThread(threading.Thread): self.result = [] def run(self): - self.result = self.func(*self.args) + try: + self.result = self.func(*self.args) + except Exception as e: + print(f"An error occurred during function execution: {e}") + self.result = None def get_result(self): - try: return self.result - except Exception: - return None \ No newline at end of file