MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / WrapUser

Function WrapUser

message/message.go:35–40  ·  view source on GitHub ↗

WrapUser creates a Message wrapping an error with a user-facing message. - Cause is the original error that can be accessed with the Unwrap method. - Code is an error code allowing an administrator to identify the error that happened. - UserMessage is the message that can be printed to the user if

(Cause error, Code string, User string, Explanation string, Args ...interface{})

Source from the content-addressed store, hash-verified

33//
34//goland:noinspection GoUnusedExportedFunction
35func WrapUser(Cause error, Code string, User string, Explanation string, Args ...interface{}) WrappingMessage {
36 return &wrappingMessage{
37 Message: UserMessage(Code, User, Explanation+" (%v)", append(Args, Cause)...),
38 cause: Cause,
39 }
40}
41
42// NewMessage creates an internal error with only the explanation for the administrator inserted.
43//

Callers 15

OnExecRequestMethod · 0.92
OnSubsystemMethod · 0.92
KeyboardInteractiveMethod · 0.92
GetAuthorizationURLMethod · 0.92
getAccessTokenMethod · 0.92
DiscoverMethod · 0.92
createFlowMethod · 0.92
getAccessTokenMethod · 0.92
GetAuthorizationURLMethod · 0.92
getAccessTokenMethod · 0.92
createFlowMethod · 0.92
getAccessTokenMethod · 0.92

Calls 1

UserMessageFunction · 0.85

Tested by

no test coverage detected