MCPcopy
hub / github.com/determined-ai/determined / NewContainerExit

Function NewContainerExit

master/pkg/aproto/exit.go:67–76  ·  view source on GitHub ↗

NewContainerExit returns a container failure with the encoded exit code. If the exit code is a the zero value, no failure is returned.

(code ExitCode)

Source from the content-addressed store, hash-verified

65// NewContainerExit returns a container failure with the encoded exit code. If the exit code is a
66// the zero value, no failure is returned.
67func NewContainerExit(code ExitCode) *ContainerFailureError {
68 if code == SuccessExitCode {
69 return nil
70 }
71 return &ContainerFailureError{
72 FailureType: ContainerFailed,
73 ErrMsg: errors.Errorf("%s: %d", ContainerFailed, code).Error(),
74 ExitCode: &code,
75 }
76}
77
78// ContainerExited returns a container failure with the encoded exit code. If the exit code is a
79// the zero value, no failure is returned.

Callers 2

reattachMethod · 0.92
waitMethod · 0.92

Calls 2

ErrorMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected