mirror of
https://github.com/rumanzo/bt2qbt.git
synced 2024-09-19 23:31:37 +02:00
Print stacktrace for debug
This commit is contained in:
parent
eb0d359b06
commit
bf6f2a519d
@ -14,6 +14,7 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime/debug"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
@ -372,7 +373,7 @@ func logic(key string, value map[string]interface{}, bitdir *string, with_label
|
||||
defer wg.Done()
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
errChannel <- fmt.Sprintf("Panic while processing torrent %v. Text panic: %v", key, r)
|
||||
errChannel <- fmt.Sprintf("Panic while processing torrent %v:\n======\nReason: %v.\nText panic:\n%v\n======", key, r, string(debug.Stack()))
|
||||
}
|
||||
}()
|
||||
var err error
|
||||
|
Loading…
Reference in New Issue
Block a user