-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e49038
commit 82062e2
Showing
10 changed files
with
362 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// StringDecodingError.swift | ||
// MullvadVPN | ||
// | ||
// Created by Mojgan on 2024-12-02. | ||
// Copyright © 2024 Mullvad VPN AB. All rights reserved. | ||
// | ||
|
||
public struct StringDecodingError: LocalizedError { | ||
public let data: Data | ||
|
||
public init(data: Data) { | ||
self.data = data | ||
} | ||
|
||
public var errorDescription: String? { | ||
"Failed to decode string from data." | ||
} | ||
} | ||
|
||
public struct StringEncodingError: LocalizedError { | ||
public let string: String | ||
|
||
public init(string: String) { | ||
self.string = string | ||
} | ||
|
||
public var errorDescription: String? { | ||
"Failed to encode string into data." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.