From 454c59a4e539bf5f141320cbd4a5d7ee576f7b3a Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sun, 9 Aug 2020 20:53:44 +0200 Subject: [PATCH] cmd/tailscale: add detail to VpnService.Builder cosntruction errors Updates tailscale/tailscale#645 Signed-off-by: Elias Naur --- cmd/tailscale/backend.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/tailscale/backend.go b/cmd/tailscale/backend.go index 8624bde..8900829 100644 --- a/cmd/tailscale/backend.go +++ b/cmd/tailscale/backend.go @@ -187,7 +187,7 @@ func (b *backend) updateTUN(service jni.Object, cfg *router.Config) error { jni.Value(jni.JavaString(env, dns.String())), ) if err != nil { - return fmt.Errorf("VpnService.Builder.addDnsServer: %v", err) + return fmt.Errorf("VpnService.Builder.addDnsServer(%v): %v", dns, err) } } @@ -200,7 +200,7 @@ func (b *backend) updateTUN(service jni.Object, cfg *router.Config) error { jni.Value(jni.JavaString(env, dom)), ) if err != nil { - return fmt.Errorf("VpnService.Builder.addSearchDomain: %v", err) + return fmt.Errorf("VpnService.Builder.addSearchDomain(%v): %v", dom, err) } } @@ -214,7 +214,7 @@ func (b *backend) updateTUN(service jni.Object, cfg *router.Config) error { jni.Value(route.Bits), ) if err != nil { - return fmt.Errorf("VpnService.Builder.addRoute: %v", err) + return fmt.Errorf("VpnService.Builder.addRoute(%v): %v", route, err) } } @@ -228,7 +228,7 @@ func (b *backend) updateTUN(service jni.Object, cfg *router.Config) error { jni.Value(addr.Bits), ) if err != nil { - return fmt.Errorf("VpnService.Builder.addAddress: %v", err) + return fmt.Errorf("VpnService.Builder.addAddress(%v): %v", addr, err) } }