diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-10-25 17:32:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-25 17:32:52 +0200 |
commit | 5da707df8e0825116222f046acf659eb3d9765fb (patch) | |
tree | 0618f8ffdb1c08c0dc29e637285501aeadec9f75 /client/go | |
parent | d6ab50a4f74e1fcf33ba02f7a8c71e474691f8a8 (diff) | |
parent | 66c7993f6b36923f9c3e3ff063ce88a944590275 (diff) |
Merge pull request #24570 from vespa-engine/arnej/get-stack-trace-from-runtime-errors
re-throw runtime errors to get their stack trace
Diffstat (limited to 'client/go')
-rw-r--r-- | client/go/script-utils/main.go | 5 |
1 files changed, 4 insertions, 1 deletions
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 { |