MCPcopy Index your code
hub / github.com/docker/docker-agent / ErrorForSession

Function ErrorForSession

pkg/runtime/event.go:278–284  ·  view source on GitHub ↗

ErrorForSession creates an error event tagged with the session ID that produced it. Use this inside the runtime run loop where sess.ID is available so that isRootEvent can distinguish root-session errors from child-session errors forwarded by runForwarding.

(sessionID, msg string)

Source from the content-addressed store, hash-verified

276// available so that isRootEvent can distinguish root-session errors from
277// child-session errors forwarded by runForwarding.
278func ErrorForSession(sessionID, msg string) Event {
279 return &ErrorEvent{
280 Type: "error",
281 SessionID: sessionID,
282 Error: msg,
283 }
284}
285
286// ErrorWithCodeForSession creates an error event with a code and session ID.
287// See ErrorForSession for the session-tagging rationale.

Callers 1

doCompactMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected