From 5e4c72dcbe14c04a6ac9745b7cd42450e0215381 Mon Sep 17 00:00:00 2001 From: Yakov Manshin Date: Fri, 3 May 2024 01:41:01 +0200 Subject: [PATCH] Error Documentation --- .../FeatureFlagResolver+Error.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Sources/YMFF/FeatureFlagResolver/FeatureFlagResolver+Error.swift b/Sources/YMFF/FeatureFlagResolver/FeatureFlagResolver+Error.swift index 62ff3bd..fa2ac8e 100644 --- a/Sources/YMFF/FeatureFlagResolver/FeatureFlagResolver+Error.swift +++ b/Sources/YMFF/FeatureFlagResolver/FeatureFlagResolver+Error.swift @@ -10,10 +10,24 @@ extension FeatureFlagResolver { /// Errors returned by `FeatureFlagResolver`. public enum Error: Swift.Error { + + /// The resolver doesn’t have any feature-flag stores suitable for the operation you’re trying to perform. + /// + /// + This error may occur if you’re trying to write a value while not having any mutable stores, + /// or if you’re trying to synchronously read a value while having only asynchronous stores. case noStoreAvailable + + /// No feature-flag store contains a value for the given key. case valueNotFoundInStores(key: String) + + /// Currently, optional values are not supported by the `FeatureFlagResolver`. + /// + /// - Note: Support for optional values will be added in [#130](https://github.com/yakovmanshin/YMFF/issues/130). case optionalValuesNotAllowed + + /// The types of the old and new values don’t match. case typeMismatch + } }