MCPcopy
hub / github.com/donknap/dpanel / ErrorMessage

Function ErrorMessage

common/function/error.go:21–31  ·  view source on GitHub ↗
(title string, message ...string)

Source from the content-addressed store, hash-verified

19}
20
21func ErrorMessage(title string, message ...string) error {
22 jsonMessage, _ := json.Marshal(message)
23 row := &gin.H{
24 "title": title,
25 "message": string(jsonMessage),
26 "type": "error",
27 "createdAt": time.Now().Local(),
28 }
29 result, _ := json.Marshal(row)
30 return errors.New(string(result))
31}

Callers 15

CreateMethod · 0.92
GetDetailMethod · 0.92
CreateByCommandMethod · 0.92
CreateByImageMethod · 0.92
RestoreMethod · 0.92
ApplyMethod · 0.92
ImportMethod · 0.92
DeleteMethod · 0.92
ImportByContainerTarMethod · 0.92
ContainerDeployMethod · 0.92
ContainerDestroyMethod · 0.92
ContainerCtrlMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected