Skip to content

Commit

Permalink
Merge pull request #486 from bparees/commit_error
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot committed May 4, 2016
2 parents c594bf4 + fafcd34 commit c99ef8b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/build/strategies/sti/sti.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ func (builder *STI) PostExecute(containerID, location string) error {

imageID, err := builder.docker.CommitContainer(opts)
if err != nil {
return errors.NewBuildError(builder.config.Tag, err)
return errors.NewCommitError(builder.config.Tag, err)
}

builder.result.Success = true
Expand Down
11 changes: 11 additions & 0 deletions pkg/errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,17 @@ func NewBuildError(name string, err error) error {
}
}

// NewCommitError returns a new error which indicates there was a problem
// committing the image
func NewCommitError(name string, err error) error {
return Error{
Message: fmt.Sprintf("building %s failed when committing the image due to error: %v", name, err),
Details: err,
ErrorCode: BuildError,
Suggestion: "check the build output for errors",
}
}

// NewTarTimeoutError returns a new error which indicates there was a problem
// when sending or receiving tar stream
func NewTarTimeoutError() error {
Expand Down

0 comments on commit c99ef8b

Please sign in to comment.