Skip to content

bootstrap: catch errors early and fail#196

Merged
pointlander merged 1 commit into
pointlander:mainfrom
dolmen-go:bootstrap-catch-errors
May 21, 2026
Merged

bootstrap: catch errors early and fail#196
pointlander merged 1 commit into
pointlander:mainfrom
dolmen-go:bootstrap-catch-errors

Conversation

@dolmen
Copy link
Copy Markdown
Contributor

@dolmen dolmen commented May 21, 2026

To ease debugging the bootstrap process, catch errors early and fail with exit code.

For example, this allows to catch mistakes made when modifying tree/peg.go.tmpl.

To ease debugging the bootstrap process, catch errors early and fail
with exit code.

For example, this allows to catch mistakes made when modifying
tree/peg.go.tmpl.
Comment thread bootstrap/main.go
if err != nil {
fmt.Printf("%v: %v\n", filename, err)
log.Fatalf("%v: %v\n", filename, err)
return
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return not needed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return statement is unreachable in practice, but AFAIK the compiler isn't aware.

@pointlander pointlander merged commit e11d102 into pointlander:main May 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants