aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/WireGuardAppError.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-12-06 16:13:48 +0530
committerRoopesh Chander <roop@roopc.net>2018-12-07 12:36:19 +0530
commitc9267ba634f5699318502035c03fa281361cc581 (patch)
tree65cb7106e0fcd3915efd5a2a1135da1b0a05fda3 /WireGuard/WireGuard/WireGuardAppError.swift
parentError handling: Cleanup Tunnels Manager errors (diff)
downloadwireguard-apple-c9267ba634f5699318502035c03fa281361cc581.tar.xz
wireguard-apple-c9267ba634f5699318502035c03fa281361cc581.zip
Error handling: Introduce a WireGuardAppError protocol to manage errors
The alert strings shall be located next to where the errors are declared. Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard/WireGuardAppError.swift')
-rw-r--r--WireGuard/WireGuard/WireGuardAppError.swift6
1 files changed, 6 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/WireGuardAppError.swift b/WireGuard/WireGuard/WireGuardAppError.swift
new file mode 100644
index 0000000..5289633
--- /dev/null
+++ b/WireGuard/WireGuard/WireGuardAppError.swift
@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright © 2018 WireGuard LLC. All Rights Reserved.
+
+protocol WireGuardAppError: Error {
+ func alertText() -> (/* title */ String, /* message */ String)
+}