Commit b8eadff3 authored by Sietse Ringers's avatar Sietse Ringers
Browse files

fix: include stack trace in panic catcher

parent c06eb1fc
...@@ -5,6 +5,7 @@ import ( ...@@ -5,6 +5,7 @@ import (
"fmt" "fmt"
"net/url" "net/url"
"reflect" "reflect"
"runtime/debug"
"strings" "strings"
"github.com/go-errors/errors" "github.com/go-errors/errors"
...@@ -584,7 +585,7 @@ func panicToError(e interface{}) *irma.SessionError { ...@@ -584,7 +585,7 @@ func panicToError(e interface{}) *irma.SessionError {
default: // nop default: // nop
} }
fmt.Println("Panic: " + info) fmt.Println("Panic: " + info)
return &irma.SessionError{ErrorType: irma.ErrorPanic, Info: info} return &irma.SessionError{ErrorType: irma.ErrorPanic, Info: info + "\n\n" + string(debug.Stack())}
} }
// Idempotently send DELETE to remote server, returning whether or not we did something // Idempotently send DELETE to remote server, returning whether or not we did something
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment