Skip to content

Commit

Permalink
Annotate errors
Browse files Browse the repository at this point in the history
Closes #17
  • Loading branch information
dim13 committed Oct 23, 2021
1 parent 9de9316 commit 6734c93
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,23 @@ func main() {

data, err := migrationData(*cache, *link)
if err != nil {
log.Fatal(err)
log.Fatal("-link parameter or cache file missing: ", err)
}

p, err := migration.Unmarshal(data)
if err != nil {
log.Fatal(err)
log.Fatal("decode data: ", err)
}

switch {
case *http != "":
if err := serve(*http, p); err != nil {
log.Fatal(err)
log.Fatal("serve http: ", err)
}
case *qr:
for _, op := range p.OtpParameters {
if err := op.WriteFile(op.FileName() + ".png"); err != nil {
log.Fatal(err)
log.Fatal("write file: ", err)
}
}
case *eval:
Expand Down

0 comments on commit 6734c93

Please sign in to comment.