Skip to content

Commit

Permalink
Fix error report
Browse files Browse the repository at this point in the history
There are two kinds of error for func "BuildChaincodeContainer",
Should distinguish them. Eliminated duplcaited content in error
message.

Change-Id: I8ceb7678acf5160cf8a81409ca6d262f6b4d9122
Signed-off-by: jiangyaoguo <jiangyaoguo@gmail.com>
  • Loading branch information
jiangyaoguo committed Aug 30, 2016
1 parent a087441 commit 3509c18
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion core/container/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (vm *VM) buildChaincodeContainerUsingDockerfilePackageBytes(spec *pb.Chainc
}
if err := vm.Client.BuildImage(opts); err != nil {
vmLogger.Errorf("Failed Chaincode docker build:\n%s\n", outputbuf.String())
return fmt.Errorf("Error building Chaincode container: %s", err)
return err
}
return nil
}
1 change: 0 additions & 1 deletion core/devops.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ func (*Devops) Build(context context.Context, spec *pb.ChaincodeSpec) (*pb.Chain

codePackageBytes, err = vm.BuildChaincodeContainer(spec)
if err != nil {
err = fmt.Errorf("Error getting chaincode package bytes: %s", err)
devopsLogger.Error(fmt.Sprintf("%s", err))
return nil, err
}
Expand Down

0 comments on commit 3509c18

Please sign in to comment.