MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / NewMessage

Function NewMessage

message/message.go:48–55  ·  view source on GitHub ↗

NewMessage creates an internal error with only the explanation for the administrator inserted. - Code is an error code allowing an administrator to identify the error that happened. - Explanation is the explanation string to the system administrator. This is an fmt.Sprintf-compatible string - Args

(Code string, Explanation string, Args ...interface{})

Source from the content-addressed store, hash-verified

46// - Args are the arguments to Explanation to create a formatted message. It is recommended that these arguments also
47// be added as labels to allow system administrators to index the error properly.
48func NewMessage(Code string, Explanation string, Args ...interface{}) Message {
49 return UserMessage(
50 Code,
51 "Internal Error",
52 Explanation,
53 Args...,
54 )
55}
56
57// Wrap creates a wrapped error with a specific Code and Explanation string. The wrapping method will automatically
58//

Callers 15

AddUserMethod · 0.92
GetUserMethod · 0.92
MainFunction · 0.92
runHealthCheckFunction · 0.92
runContainerSSHFunction · 0.92
healthCheckFunction · 0.92
handleDataMethod · 0.92
handleCloseMethod · 0.92
handleSuccessMethod · 0.92
handleErrorMethod · 0.92
handleBackendMethod · 0.92
StartClientMethod · 0.92

Calls 1

UserMessageFunction · 0.85

Tested by 4

AddUserMethod · 0.74
GetUserMethod · 0.74
TestAuthFunction · 0.74
Test04CompatibilityFunction · 0.74