github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/os/exec/exec.go (about)

     1  package exec
     2  
     3  import "os"
     4  
     5  // An ExitError reports an unsuccessful exit by a command.
     6  type ExitError struct {
     7  	*os.ProcessState
     8  
     9  	// Stderr holds a subset of the standard error output from the
    10  	// Cmd.Output method if standard error was not otherwise being
    11  	// collected.
    12  	//
    13  	// If the error output is long, Stderr may contain only a prefix
    14  	// and suffix of the output, with the middle replaced with
    15  	// text about the number of omitted bytes.
    16  	//
    17  	// Stderr is provided for debugging, for inclusion in error messages.
    18  	// Users with other needs should redirect Cmd.Stderr as needed.
    19  	Stderr []byte
    20  }
    21  
    22  func (e *ExitError) Error() string {
    23  	return e.ProcessState.String()
    24  }