mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
unify all panic event to panic log file (#2250)
This commit is contained in:
@@ -228,6 +228,7 @@ func (r *ToolRegistry) ExecuteWithContext(
|
||||
func() {
|
||||
defer func() {
|
||||
if re := recover(); re != nil {
|
||||
logger.RecoverPanicNoExit(re)
|
||||
errMsg := fmt.Sprintf("Tool '%s' crashed with panic: %v", name, re)
|
||||
logger.ErrorCF("tool", "Tool execution panic recovered",
|
||||
map[string]any{
|
||||
|
||||
Reference in New Issue
Block a user