mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 14:16:21 +00:00
Add stack trace upon exception
This commit is contained in:
1 parent
60ea8fcc98
commit
fa5961b5fc
1 file changed
+3
-2
+3
-2
@@ -5,6 +5,7 @@ The Serena Model Context Protocol (MCP) Server
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import traceback
|
||||
from abc import ABC, abstractmethod
|
||||
from collections.abc import AsyncIterator
|
||||
from contextlib import asynccontextmanager
|
||||
@@ -96,8 +97,8 @@ class Tool(Component):
|
||||
try:
|
||||
return self._execute()
|
||||
except Exception as e:
|
||||
log.error(f"Error executing tool: {e}")
|
||||
return f"Error executing tool: {e}"
|
||||
msg = f"Error executing tool: {e}\n{traceback.format_exc()}"
|
||||
return msg
|
||||
|
||||
@abstractmethod
|
||||
def _execute(self) -> str:
|
||||
|
||||
Reference in new issue
Block a user