mirror of
https://github.com/rumanzo/bt2qbt.git
synced 2024-11-09 20:32:33 +01:00
Print stacktrace for debug
This commit is contained in:
parent
eb0d359b06
commit
bf6f2a519d
@ -14,6 +14,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime/debug"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@ -372,7 +373,7 @@ func logic(key string, value map[string]interface{}, bitdir *string, with_label
|
|||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
defer func() {
|
defer func() {
|
||||||
if r := recover(); r != nil {
|
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
|
var err error
|
||||||
|
Loading…
Reference in New Issue
Block a user