MCPcopy Index your code
hub / github.com/jetify-com/devbox / WithUserMessage

Function WithUserMessage

internal/boxcli/usererr/usererr.go:54–64  ·  view source on GitHub ↗
(source error, msg string, args ...any)

Source from the content-addressed store, hash-verified

52}
53
54func WithUserMessage(source error, msg string, args ...any) error {
55 // We don't want to wrap the error if it already has a user message. Doing
56 // so would obscure the original error message which is likely more useful.
57 if source == nil || hasUserMessage(source) {
58 return source
59 }
60 return &combined{
61 source: source,
62 userMessage: fmt.Sprintf(msg, args...),
63 }
64}
65
66func WithLoggedUserMessage(source error, msg string, args ...any) error {
67 if source == nil || hasUserMessage(source) {

Callers 9

searchCmdFunction · 0.92
addCmdFunction · 0.92
GetProcessManagerPortFunction · 0.92
AddMethod · 0.92
OpenFunction · 0.92
InfoMethod · 0.92
findPackageByNameMethod · 0.92

Calls 1

hasUserMessageFunction · 0.85

Tested by

no test coverage detected