Skip to content

Commit

Permalink
handle schema loading error better
Browse files Browse the repository at this point in the history
  • Loading branch information
vektah committed Feb 8, 2020
1 parent aacc9b1 commit 2f0fa0e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions codegen/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ func LoadConfig(filename string) (*Config, error) {
var schemaRaw []byte
schemaRaw, err = ioutil.ReadFile(filename)
if err != nil {
fmt.Fprintln(os.Stderr, "unable to open schema: "+err.Error())
os.Exit(1)
return nil, errors.Wrap(err, "unable to open schema")
}

config.Sources = append(config.Sources, &ast.Source{Name: filename, Input: string(schemaRaw)})
Expand Down

0 comments on commit 2f0fa0e

Please sign in to comment.