From ba9f348e1c59467488dec1a1edf418471ebf3ed3 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Thu, 21 Jul 2016 22:49:47 +0100 Subject: [PATCH] Enable stack trace logging --- db/db.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db/db.go b/db/db.go index 508b8d56..db1bd02a 100644 --- a/db/db.go +++ b/db/db.go @@ -18,6 +18,8 @@ import ( "fmt" "time" + "runtime/debug" + "github.com/abcum/fibre" "github.com/abcum/surreal/cnf" "github.com/abcum/surreal/kvs" @@ -121,6 +123,7 @@ func execute(ctx *fibre.Context, ast *sql.Query, chn chan<- interface{}) { defer func() { if r := recover(); r != nil { if err, ok := r.(error); ok { + fmt.Printf("%s", debug.Stack()) chn <- err } }