mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 14:16:21 +00:00
Report error and stack trace for any uncaught exceptions in task queue
This commit is contained in:
1 parent
2d8a226d40
commit
6ce7d73130
1 file changed
+5
-2
+5
-2
@@ -378,8 +378,11 @@ class SerenaAgent:
|
||||
self._task_executor_task_index += 1
|
||||
|
||||
def task_execution_wrapper() -> Any:
|
||||
with LogTime(task_name, logger=log):
|
||||
return task()
|
||||
try:
|
||||
with LogTime(task_name, logger=log):
|
||||
return task()
|
||||
except Exception as e:
|
||||
log.error(f"Error during execution of {task_name}: {e}", exc_info=e)
|
||||
|
||||
log.info(f"Scheduling {task_name}")
|
||||
return self._task_executor.submit(task_execution_wrapper)
|
||||
|
||||
Reference in new issue
Block a user