GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor: print nicer error to load config error by KarolosLykos · Pull Request #428 · commitdev/zero

Conversation

@KarolosLykos

@KarolosLykos KarolosLykos commented Oct 21, 2021

Copy link
Copy Markdown
Contributor

zero/internal/config/projectconfig/project_config.go

Lines 70 to 74 in 0c9bf0c

log.Panicf("failed to read config: %v", err)
}
err = yaml.Unmarshal(data, &config)
if err != nil {
log.Panicf("failed to parse config: %v", err)

This is a fairly common failure case and it should be pretty obvious to the user how to resolve it, there's no need for the stack trace we get with log.Panicf, let's use exit.Fatal instead.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@KarolosLykos
refactor: print nicer error to load config error
3c933dc
bmonkman
bmonkman reviewed Oct 22, 2021
View reviewed changes
Comment thread .idea/modules.xml Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bmonkman

bmonkman commented Oct 22, 2021

Copy link
Copy Markdown
Contributor

Awesome, thank you! Just one request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bmonkman bmonkman linked an issue Oct 22, 2021 that may be closed by this pull request
Print nicer error when failing to load project config #427
Closed
@KarolosLykos
refactor: print nicer error to load config error
a26c4e1
@bmonkman

bmonkman commented Oct 24, 2021

Copy link
Copy Markdown
Contributor

You'll also have to remove the files that were added in the previous commit.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@KarolosLykos
refactor: print nicer error to load config error
8946fca
bmonkman
bmonkman approved these changes Oct 25, 2021
View reviewed changes

@bmonkman bmonkman left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for the contribution!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

KarolosLykos reacted with hooray emoji
All reactions
  • 🎉 1 reaction
@bmonkman
bmonkman merged commit 5250229 into commitdev:main Oct 27, 2021
@KarolosLykos
KarolosLykos deleted the issue-427-print_nicer_error_to_load_config branch November 17, 2021 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@bmonkman bmonkman bmonkman approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Print nicer error when failing to load project config

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@KarolosLykos @bmonkman
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.