From c9267ba634f5699318502035c03fa281361cc581 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Thu, 6 Dec 2018 16:13:48 +0530 Subject: 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 --- WireGuard/WireGuard/WireGuardAppError.swift | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 WireGuard/WireGuard/WireGuardAppError.swift (limited to 'WireGuard/WireGuard/WireGuardAppError.swift') 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) +} -- cgit v1.2.3-59-g8ed1b