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

Method AddError

pkg/session/store.go:346–357  ·  view source on GitHub ↗

AddError appends a recorded error item to a session at the next position.

(_ context.Context, sessionID string, e *Error)

Source from the content-addressed store, hash-verified

344
345// AddError appends a recorded error item to a session at the next position.
346func (s *InMemorySessionStore) AddError(_ context.Context, sessionID string, e *Error) error {
347 if sessionID == "" {
348 return ErrEmptyID
349 }
350 session, exists := s.sessions.Load(sessionID)
351 if !exists {
352 return ErrNotFound
353 }
354 errCopy := *e
355 session.AddError(&errCopy)
356 return nil
357}
358
359// querier is an interface that abstracts *sql.DB and *sql.Tx for query operations.
360type querier interface {

Callers 2

TestAddError_NotFoundFunction · 0.95

Calls 2

LoadMethod · 0.80
AddErrorMethod · 0.65

Tested by 2

TestAddError_NotFoundFunction · 0.76