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>
This commit is contained in:
Roopesh Chander
2018-12-07 12:36:19 +05:30
parent 8d26a3c536
commit c9267ba634
4 changed files with 39 additions and 29 deletions
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright © 2018 WireGuard LLC. All Rights Reserved.
protocol WireGuardAppError: Error {
func alertText() -> (/* title */ String, /* message */ String)
}