aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-03-20 23:36:34 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2019-03-21 03:24:11 -0600
commitf425baae74c5d4503e98edfb3323391688f5c36b (patch)
treea7dd0486b933f81cd95837cef27b71c9dcde4f5b
parentringlogger: introduce basic file ring logging (diff)
downloadwireguard-windows-f425baae74c5d4503e98edfb3323391688f5c36b.tar.xz
wireguard-windows-f425baae74c5d4503e98edfb3323391688f5c36b.zip
errors: don't put periods at end of errors
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--service/errors.go34
-rw-r--r--ui/ui.go6
2 files changed, 22 insertions, 18 deletions
diff --git a/service/errors.go b/service/errors.go
index 02ca33dc..a2050460 100644
--- a/service/errors.go
+++ b/service/errors.go
@@ -35,39 +35,39 @@ const (
func (e Error) Error() string {
switch e {
case ErrorSuccess:
- return "No error."
+ return "No error"
case ErrorRingloggerOpen:
- return "Unable to open log file."
+ return "Unable to open log file"
case ErrorDetermineExecutablePath:
- return "Unable to determine path of running executable."
+ return "Unable to determine path of running executable"
case ErrorLoadConfiguration:
- return "Unable to load configuration from path."
+ return "Unable to load configuration from path"
case ErrorCreateWintun:
- return "Unable to create Wintun device."
+ return "Unable to create Wintun device"
case ErrorDetermineWintunName:
- return "Unable to determine Wintun name."
+ return "Unable to determine Wintun name"
case ErrorUAPIListen:
- return "Unable to listen on named pipe."
+ return "Unable to listen on named pipe"
case ErrorUAPISerialization:
- return "Unable to serialize configuration into uapi form."
+ return "Unable to serialize configuration into uapi form"
case ErrorDeviceSetConfig:
- return "Unable to set device configuration."
+ return "Unable to set device configuration"
case ErrorBindSocketsToDefaultRoutes:
- return "Unable to bind sockets to default route."
+ return "Unable to bind sockets to default route"
case ErrorSetNetConfig:
- return "Unable to set interface addresses, routes, dns, and/or adapter settings."
+ return "Unable to set interface addresses, routes, dns, and/or adapter settings"
case ErrorFindAdministratorsSID:
- return "Unable to find Administrators SID."
+ return "Unable to find Administrators SID"
case ErrorOpenNULFile:
- return "Unable to open NUL file."
+ return "Unable to open NUL file"
case ErrorTrackTunnels:
- return "Unable to track existing tunnels."
+ return "Unable to track existing tunnels"
case ErrorEnumerateSessions:
- return "Unable to enumerate current sessions."
+ return "Unable to enumerate current sessions"
case ErrorWin32:
- return "An internal Windows error has occurred."
+ return "An internal Windows error has occurred"
default:
- return "An unknown error has occurred."
+ return "An unknown error has occurred"
}
}
diff --git a/ui/ui.go b/ui/ui.go
index bbae9980..3f8f53a1 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -261,7 +261,11 @@ func RunUI() {
setServiceState(tunnel, state, err == nil)
if err != nil {
if mw.Visible() {
- walk.MsgBox(mw, "Tunnel Error", err.Error()+"\n\nPlease consult the log for more information.", walk.MsgBoxIconWarning)
+ errMsg := err.Error()
+ if len(errMsg) > 0 && errMsg[len(errMsg)-1] != '.' {
+ errMsg += "."
+ }
+ walk.MsgBox(mw, "Tunnel Error", errMsg+"\n\nPlease consult the log for more information.", walk.MsgBoxIconWarning)
} else {
tray.ShowError("WireGuard Tunnel Error", err.Error())
}