From 3b1826740e749aaa2b7ebd51559bdfc44bae52d7 Mon Sep 17 00:00:00 2001 From: Nate Brown Date: Fri, 22 Nov 2019 16:18:33 -0800 Subject: [PATCH] Improve tun/udp init error messages --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index fa739ca..1e9dc59 100644 --- a/main.go +++ b/main.go @@ -112,14 +112,14 @@ func Main(configPath string, configTest bool, buildVersion string) { config.GetInt("tun.tx_queue", 500), ) if err != nil { - l.Fatal(err) + l.WithError(err).Fatal("Failed to get a tun/tap device") } // set up our UDP listener udpQueues := config.GetInt("listen.routines", 1) udpServer, err := NewListener(config.GetString("listen.host", "0.0.0.0"), config.GetInt("listen.port", 0), udpQueues > 1) if err != nil { - l.Fatal(err) + l.WithError(err).Fatal("Failed to open udp listener") } udpServer.reloadConfig(config)