Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Panic ¶
func Panic(err error)
Panic is meant to be used in user facing applications like command line tools. Such applications usually propagate back runtime errors. In order to make error handling for these specific cases most convenient Panic might simply be called. The program entry point might be as simple as the following snippet.
func main() { err := mainE(context.Background()) if err != nil { tracer.Panic(err) } }
The code snippet of the program entry point above might produce an output like below.
program panic { "anno": "rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp :7777: connect: connection refused\"", "stck": [ "--REPLACED--/main.go:59", "--REPLACED--/main.go:23" ], "type": "*status.Error" } exit status 1
Types ¶
type Error ¶
type Error struct { Anno string `json:"anno,omitempty"` Desc string `json:"desc,omitempty"` Docs string `json:"docs,omitempty"` Kind string `json:"kind,omitempty"` Stck string `json:"stck,omitempty"` Type string `json:"type,omitempty"` Wrpd error `json:"-"` }
func (*Error) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.