Skip to content

Improve error message on build failure #536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/compile/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func NewCommand() *cobra.Command {
func run(cmd *cobra.Command, args []string) {
inst, err := instance.CreateInstance()
if err != nil {
feedback.Errorf("Error during build: %v", err)
feedback.Errorf("Error creating instance: %v", err)
os.Exit(errorcodes.ErrGeneric)
}

Expand Down
2 changes: 1 addition & 1 deletion commands/compile/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func Compile(ctx context.Context, req *rpc.CompileReq, outStream, errStream io.W

// if it's a regular build, go on...
if err := builder.RunBuilder(builderCtx); err != nil {
return nil, fmt.Errorf("build failed: %s", err)
return nil, err
}

// FIXME: Make a function to obtain these info...
Expand Down
4 changes: 2 additions & 2 deletions legacy/builder/phases/sizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ func checkSize(ctx *types.Context, buildProperties *properties.Map) error {

if textSize > maxTextSize {
logger.Println(constants.LOG_LEVEL_ERROR, constants.MSG_SIZER_TEXT_TOO_BIG)
return errors.New("")
return errors.New("text section exceeds available space in board")
}

if maxDataSize > 0 && dataSize > maxDataSize {
logger.Println(constants.LOG_LEVEL_ERROR, constants.MSG_SIZER_DATA_TOO_BIG)
return errors.New("")
return errors.New("data section exceeds available space in board")
}

if properties.Get(constants.PROPERTY_WARN_DATA_PERCENT) != "" {
Expand Down