Documentation ¶
Index ¶
- func Extract(err error) (error, bool)
- func IsWarning(err error) bool
- func New(msg string, args ...any) error
- func NewExecError(source error) error
- func NewLogged(msg string, args ...any) error
- func NewWarning(msg string, args ...any) error
- func ShouldLogError(err error) bool
- func WithLoggedUserMessage(source error, msg string, args ...any) error
- func WithUserMessage(source error, msg string, args ...any) error
- type ExitError
- Bugs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates new user error with the given message. By default these errors are not logged to Sentry. If you want to log the error, use NewLogged
func NewExecError ¶
func NewLogged ¶
NewLogged creates new user error with the given message. These messages are logged to Sentry without the message (for privacy reasons). This is useful for unexpected errors that we want to make sure to log but we also want to attach a good human readable message to.
func NewWarning ¶
func ShouldLogError ¶
ShouldLogError returns true if the it's a logged user error or is a non-user error
func WithLoggedUserMessage ¶
Types ¶
Notes ¶
Bugs ¶
exec.Cmd.Run can return other error types, such as when the binary path isn't found. Those should still be considered a user exec error and not reported to Sentry.