MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / Wrap

Function Wrap

message/message.go:66–71  ·  view source on GitHub ↗

Wrap creates a wrapped error with a specific Code and Explanation string. The wrapping method will automatically append the error message in brackets. - 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

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

Source from the content-addressed store, hash-verified

64// - Args are the arguments to Explanation to create a formatted message. It is recommended that these arguments also
65// be added as labels to allow system administrators to index the error properly.
66func Wrap(Cause error, Code string, Explanation string, Args ...interface{}) WrappingMessage {
67 return &wrappingMessage{
68 Message: NewMessage(Code, Explanation+" (%v)", append(Args, Cause)...),
69 cause: Cause,
70 }
71}
72
73// endregion
74

Callers 15

NewFunction · 0.92
AddKeyMethod · 0.92
MainFunction · 0.92
runContainerSSHFunction · 0.92
generateHostKeysFunction · 0.92
WriteMethod · 0.92
handleDataMethod · 0.92
handleBackendMethod · 0.92
newConnectionMethod · 0.92
StartClientMethod · 0.92
StartServerForwardMethod · 0.92

Calls 1

NewMessageFunction · 0.85

Tested by 1

AddKeyMethod · 0.74