Documentation ¶
Index ¶
Constants ¶
View Source
const ( Success Status = 0 // NoError indicates there is no errors. GeneralError = 1 // It is for undefined error, but should be avoid to use if possible. // Exit code 30 - 59 will be reserved for user related errors MarshalError = 30 // Failed to marshal data. UnmarshalError // Failed to unmarshal data. InvalidArgument = 35 // Invalid argument. MissingArgument // Missing argument. // Exit code 60 - 100 will be reserved for server related errors. IOCreateError = 60 // Failed to create file or directory. IOAccessError // Failed to access file or directory. IOCaptureError // Failed to capture stdin/stdout/stderr of command ConnectionError = 70 // Failed to connect. ServerStartingError = 80 // Failed to start a GRPC server. MessageSendingError = 85 // Failed to send message. CommandStartingError = 90 // Failed to start a command. CommandExitError // Command exit with error. )
Following constants are possible value for the status of StatusError.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type StatusError ¶
type StatusError struct {
// contains filtered or unexported fields
}
StatusError stores both the exit status and the actual error.
func NewStatusError ¶
func NewStatusError(status Status, err error) *StatusError
NewStatusError creates a StatusError with the passed status code and error.
Click to show internal directories.
Click to hide internal directories.