Digital ACT191 story ONEAPP-7459 - Update for convenience in registration of models that replace

This commit is contained in:
Scott Pfeil 2024-05-20 16:44:10 -04:00
parent 4bded0a433
commit d2572c4543

View File

@ -50,9 +50,9 @@ public struct ModelRegistry {
/// A convenience wrapping function where error handling is managed within the class. /// A convenience wrapping function where error handling is managed within the class.
/// - Parameter type: Takes an object of ModelProtocol.self which is used to register /// - Parameter type: Takes an object of ModelProtocol.self which is used to register
public static func register<M: ModelProtocol>(_ type: M.Type) { public static func register<M: ModelProtocol>(_ type: M.Type, allowsReplace: Bool = false) {
do { do {
try throwable_register(type: type) try throwable_register(type: type, allowsReplace: allowsReplace)
} catch { } catch {
handleError(error) handleError(error)
} }