Documentation
¶
Overview ¶
Package jerr prints errors and, for command-line programs, exits.
Die and Dief are for the "unrecoverable error, print it and stop" moment: the message goes to stderr, a stack trace is added when DEBUG is set in the environment, and the process exits with code 1. Warn and Warnf print without exiting.
The plain variants print the error itself. The formatted variants print your message; the error is not printed unless you put it in the format:
jerr.Warnf(err, "create %s: %v", name, err)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Die ¶
func Die(err error)
Die prints err and exits with code 1. It does nothing when err is nil.
func Dief ¶
Dief prints the formatted message like Warnf and then exits with code 1. It does nothing when err is nil.
Types ¶
This section is empty.