From 6734c93f5d533b41c83d6246ca21aa3622a1d64a Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 23 Oct 2021 21:01:33 +0200 Subject: [PATCH] Annotate errors Closes #17 --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 1c828e8..ef9a761 100644 --- a/main.go +++ b/main.go @@ -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: