From 66c7993f6b36923f9c3e3ff063ce88a944590275 Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Tue, 25 Oct 2022 09:57:53 +0000 Subject: re-throw runtime errors to get their stack trace --- client/go/script-utils/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'client/go') diff --git a/client/go/script-utils/main.go b/client/go/script-utils/main.go index 189140158ae..a27e94a76a7 100644 --- a/client/go/script-utils/main.go +++ b/client/go/script-utils/main.go @@ -6,6 +6,7 @@ package main import ( "fmt" "os" + "runtime" "strings" "github.com/vespa-engine/vespa/client/go/cmd/clusterstate" @@ -68,7 +69,9 @@ func main() { func handleSimplePanic() { if r := recover(); r != nil { - if je, ok := r.(error); ok { + if rte, ok := r.(runtime.Error); ok { + panic(rte) + } else if je, ok := r.(error); ok { fmt.Fprintln(os.Stderr, je) os.Exit(1) } else { -- cgit v1.2.3