about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--aerc.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/aerc.go b/aerc.go
index dafdd22..40e6605 100644
--- a/aerc.go
+++ b/aerc.go
@@ -92,11 +92,16 @@ var (
 	Version  string
 )
 
+func usage() {
+	log.Fatal("Usage: aerc [-v]")
+}
+
 func main() {
 	// TODO: Support starting with mailto links, ad-hoc accounts, etc
 	opts, optind, err := getopt.Getopts(os.Args, "v")
 	if err != nil {
-		panic(err)
+		log.Print(err)
+		usage()
 	}
 	for _, opt := range opts {
 		switch opt.Option {
@@ -106,7 +111,7 @@ func main() {
 		}
 	}
 	if optind != len(os.Args) {
-		log.Fatal("Usage: aerc [-v]")
+		usage()
 	}
 
 	var (
rc/blame/config/accounts.conf?h=0.5.0&id=f37508a53980f38c530780650338797e81fe1e3c'>^
17bd2dc ^
39c93d2 ^




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22