fix errors handlig

This commit is contained in:
stefanodvx 2025-04-15 19:12:24 +02:00
parent b4b371e0db
commit eb30f85846
2 changed files with 5 additions and 3 deletions

View file

@ -3,6 +3,7 @@ package bot
import (
"log"
"os"
"runtime/debug"
"strconv"
"time"
@ -53,7 +54,8 @@ func Start() {
},
Panic: func(b *gotgbot.Bot, ctx *ext.Context, r interface{}) {
if logDispatcherErrors {
log.Printf("panic occurred while handling update: %v", r)
log.Printf("panic occurred while handling update: %v\n", r)
log.Printf("stack trace:\n%s\n", debug.Stack())
}
},
MaxRoutines: concurrentUpdates,