From 375feb94c1d18a1e006a7fbbbbc306fc18c149f3 Mon Sep 17 00:00:00 2001 From: Laurent Date: Wed, 8 May 2024 13:38:15 +0200 Subject: [PATCH] Improve error message --- LeStorage/StoredSingleton.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/LeStorage/StoredSingleton.swift b/LeStorage/StoredSingleton.swift index 2da2579..a3c5223 100644 --- a/LeStorage/StoredSingleton.swift +++ b/LeStorage/StoredSingleton.swift @@ -23,4 +23,14 @@ public class StoredSingleton: StoredCollection { return self.items.first } + // MARK: - Protects from use + +// public override func addOrUpdate(instance: T) throws { +// fatalError("method unavailable for StoredSingleton") +// } + + public override func addOrUpdate(contentOfs sequence: any Sequence) throws { + fatalError("method unavailable for StoredSingleton, use update") + } + }